@plaso-infi/whiteboard-sdk 0.9.9-alpha1.1 → 0.9.10-alpha1.2
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/dist/esm/arc-f453aa24-001bbdd5.js +1 -0
- package/dist/esm/blockDiagram-38ab4fdb-5054d111-916200b0.js +1 -0
- package/dist/esm/c4Diagram-3d4e48cf-5c418a03-d69b6a9c.js +1 -0
- package/dist/esm/channel-d0c23f49-f259a6d1.js +1 -0
- package/dist/esm/classDiagram-70f12bd4-491ee226-467aef5f.js +1 -0
- package/dist/esm/classDiagram-v2-f2320105-e90ceb2f-abf81ed0.js +1 -0
- package/dist/esm/clone-f55b0cc7-e67cd753.js +1 -0
- package/dist/esm/createText-2e5e7dd3-dcc34ae8-3c64ca2d.js +1 -0
- package/dist/esm/edges-e0da2a9e-8abaed90-a3e3f930.js +1 -0
- package/dist/esm/erDiagram-9861fffd-20c9cea5-06108c89.js +1 -0
- package/dist/esm/{flowDb-956e92f1-05858601-f0b0a431.js → flowDb-956e92f1-3b9320a7-67f62d02.js} +1 -1
- package/dist/esm/flowDiagram-66a62f08-08a6f0e7-acbc8998.js +1 -0
- package/dist/esm/flowDiagram-v2-96b9c2cf-6b10acd5-d6f5b177.js +1 -0
- package/dist/esm/flowchart-elk-definition-4a651766-e5b3ba00-a86e3534.js +1 -0
- package/dist/esm/ganttDiagram-c361ad54-be9f4bb3-9fd6d707.js +1 -0
- package/dist/esm/{gitGraphDiagram-72cf32ee-6962610d-ce66735c.js → gitGraphDiagram-72cf32ee-a0e338f3-fedb2c3a.js} +1 -1
- package/dist/esm/graph-afe27007-8e18cc75.js +1 -0
- package/dist/esm/hls-8060cc31-cbc4e4b4.js +1 -0
- package/dist/esm/{index-0c25c9f2.js → index-167f08a0.js} +10 -10
- package/dist/esm/index-3862675e-87ca6a66-f6d07d04.js +1 -0
- package/dist/esm/index-43b715ff-0a40eb86.js +7 -0
- package/dist/esm/index.css +27675 -31377
- package/dist/esm/index.d.ts +6 -143
- package/dist/esm/index.js +1 -1
- package/dist/esm/{infoDiagram-f8f76790-ff02a986-1c2bb5a5.js → infoDiagram-f8f76790-4379e779-22c1733f.js} +1 -1
- package/dist/esm/journeyDiagram-49397b02-2cca535b-67946860.js +1 -0
- package/dist/esm/layout-ae3a065f-6e640144.js +1 -0
- package/dist/esm/{line-8bf27c33-c9dee662.js → line-7161536c-1eab81ab.js} +1 -1
- package/dist/esm/linear-5dc481fe-05c0f51e.js +1 -0
- package/dist/esm/lottie-e933e82b-ded8d0d3.js +1 -0
- package/dist/esm/mindmap-definition-fc14e90a-5dcd2e6e-eef8a18b.js +9 -0
- package/dist/esm/{ordinal-9e8754c0-c9285688.js → ordinal-03018387-faf5bec3.js} +1 -1
- package/dist/esm/pdf_lib-55fc68be-7c552411.js +1 -0
- package/dist/esm/{pieDiagram-8a3498a8-95075175-f271e7e0.js → pieDiagram-8a3498a8-6c705dfb-ac29777a.js} +1 -1
- package/dist/esm/quadrantDiagram-120e2f19-ce717132-2ca6a80f.js +1 -0
- package/dist/esm/{requirementDiagram-deff3bca-29300a5c-74399573.js → requirementDiagram-deff3bca-94ff9b49-53ba3062.js} +1 -1
- package/dist/esm/sankeyDiagram-04a897e0-7f5565ac-73d22dce.js +1 -0
- package/dist/esm/sequenceDiagram-704730f1-65919a25-99547f7a.js +1 -0
- package/dist/esm/stateDiagram-587899a1-2d298c91-69f94d43.js +1 -0
- package/dist/esm/stateDiagram-v2-d93cdb3a-d0d0a3cb-c5f54ac0.js +1 -0
- package/dist/esm/{styles-6aaf32cf-27c06757-9924063a.js → styles-6aaf32cf-9dfc64a7-73ae2457.js} +1 -1
- package/dist/esm/{styles-9a916d00-db7a32f0-40cad9b3.js → styles-9a916d00-f70df3fd-82031337.js} +1 -1
- package/dist/esm/styles-c10674c1-9ccf4241-d16c7c7b.js +1 -0
- package/dist/esm/{svgDrawCommon-08f97a94-12aefbff-7bed41c9.js → svgDrawCommon-08f97a94-6a32c869-fc129345.js} +1 -1
- package/dist/esm/{timeline-definition-85554ec2-475c323b-17118daa.js → timeline-definition-85554ec2-0d0b57da-737d18f2.js} +1 -1
- package/dist/esm/web-pinyin-dbdcf553.js +1 -0
- package/dist/esm/xychartDiagram-e933f94c-d01b914a-f5a15a41.js +1 -0
- package/package.json +2 -6
- package/dist/esm/arc-0fffff1f-cb15888d.js +0 -1
- package/dist/esm/blockDiagram-38ab4fdb-b22c3166-94cafbe4.js +0 -1
- package/dist/esm/c4Diagram-3d4e48cf-ab3a2217-04f37a60.js +0 -1
- package/dist/esm/channel-ff3e58f7-441d1956.js +0 -1
- package/dist/esm/classDiagram-70f12bd4-b7cecb7d-02f67aec.js +0 -1
- package/dist/esm/classDiagram-v2-f2320105-88330ff5-f9e02a46.js +0 -1
- package/dist/esm/clone-e72fc4b8-e0d9c611.js +0 -1
- package/dist/esm/createText-2e5e7dd3-3d197991-1dc23da3.js +0 -1
- package/dist/esm/edges-e0da2a9e-fba3c3a7-06d257f8.js +0 -1
- package/dist/esm/erDiagram-9861fffd-3dedc17c-b3410b98.js +0 -1
- package/dist/esm/export_as_markdown-b48293a8-00bd7ea7.js +0 -1
- package/dist/esm/flowDiagram-66a62f08-b3c97779-70248993.js +0 -1
- package/dist/esm/flowDiagram-v2-96b9c2cf-58d3ab5f-20c5bbe1.js +0 -1
- package/dist/esm/flowchart-elk-definition-4a651766-4ec085d8-a42f0ee1.js +0 -1
- package/dist/esm/ganttDiagram-c361ad54-25aec23c-d8a3f436.js +0 -1
- package/dist/esm/graph-a2efb7be-713af9a6.js +0 -1
- package/dist/esm/hls-2930c8f9-d0274088.js +0 -1
- package/dist/esm/index-069d79ba-7af162da.js +0 -7
- package/dist/esm/index-3862675e-b2881445-8d90f1dc.js +0 -1
- package/dist/esm/journeyDiagram-49397b02-8ee31d6c-be9e21a6.js +0 -1
- package/dist/esm/layout-f41a9481-b65a914c.js +0 -1
- package/dist/esm/linear-bf7a4ead-aef02647.js +0 -1
- package/dist/esm/lottie-b2af09ef-63710b41.js +0 -1
- package/dist/esm/mindmap-definition-fc14e90a-5d304050-073c89e4.js +0 -9
- package/dist/esm/pdf_lib-759c3824-5535ffeb.js +0 -1
- package/dist/esm/quadrantDiagram-120e2f19-8bb878d9-47628e3e.js +0 -1
- package/dist/esm/sankeyDiagram-04a897e0-8e1ff3ae-7e61ab0d.js +0 -1
- package/dist/esm/sequenceDiagram-704730f1-6a89eb72-b6d29a75.js +0 -1
- package/dist/esm/stateDiagram-587899a1-615f787b-70f1fbc3.js +0 -1
- package/dist/esm/stateDiagram-v2-d93cdb3a-0da1e02b-9d5b2272.js +0 -1
- package/dist/esm/styles-c10674c1-3e724aac-5b3a371b.js +0 -1
- package/dist/esm/web-pinyin-cc77b789.js +0 -1
- package/dist/esm/xychartDiagram-e933f94c-43d0ec04-d4af0981.js +0 -1
- /package/dist/esm/{Tableau10-0d093dcf-a3138301.js → Tableau10-e8b1eccc-4cef513c.js} +0 -0
- /package/dist/esm/{array-75b204b6-7055adac.js → array-5c028890-e9486e2e.js} +0 -0
- /package/dist/esm/{init-7e0ff151-92a0ac09.js → init-426b8023-e9aac3aa.js} +0 -0
- /package/dist/esm/{path-5bb65086-3ae6d6fa.js → path-a3e377ce-ded30e71.js} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{C as t}from"./index-0c25c9f2.js";import"react";import"react-dom";import"stream";const e={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},r={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},s={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},i={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},o={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class n{static getFirstMatch(t,e){const r=e.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,e){const r=e.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,e,r){if(t.test(e))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const e=t.split(".").splice(0,2).map(t=>parseInt(t,10)||0);if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const e=t.split(".").splice(0,2).map(t=>parseInt(t,10)||0);if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,e,r=!1){const s=n.getVersionPrecision(t),i=n.getVersionPrecision(e);let o=Math.max(s,i),a=0;const d=n.map([t,e],t=>{const e=o-n.getVersionPrecision(t),r=t+new Array(e+1).join(".0");return n.map(r.split("."),t=>new Array(20-t.length).join("0")+t).reverse()});for(r&&(a=o-Math.min(s,i)),o-=1;o>=a;){if(d[0][o]>d[1][o])return 1;if(d[0][o]===d[1][o]){if(o===a)return 0;o-=1}else if(d[0][o]<d[1][o])return-1}}static map(t,e){const r=[];let s;if(Array.prototype.map)return Array.prototype.map.call(t,e);for(s=0;s<t.length;s+=1)r.push(e(t[s]));return r}static find(t,e){let r,s;if(Array.prototype.find)return Array.prototype.find.call(t,e);for(r=0,s=t.length;r<s;r+=1){const s=t[r];if(e(s,r))return s}}static assign(t,...e){const r=t;let s,i;if(Object.assign)return Object.assign(t,...e);for(s=0,i=e.length;s<i;s+=1){const t=e[s];"object"==typeof t&&null!==t&&Object.keys(t).forEach(e=>{r[e]=t[e]})}return t}static getBrowserAlias(t){return e[t]}static getBrowserTypeByAlias(t){return r[t]||""}}const a=/version\/(\d+(\.?_?\d+)+)/i,d=[{test:[/googlebot/i],describe(t){const e={name:"Googlebot"},r=n.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/opera/i],describe(t){const e={name:"Opera"},r=n.getFirstMatch(a,t)||n.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opr\/|opios/i],describe(t){const e={name:"Opera"},r=n.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/SamsungBrowser/i],describe(t){const e={name:"Samsung Internet for Android"},r=n.getFirstMatch(a,t)||n.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Whale/i],describe(t){const e={name:"NAVER Whale Browser"},r=n.getFirstMatch(a,t)||n.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MZBrowser/i],describe(t){const e={name:"MZ Browser"},r=n.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/focus/i],describe(t){const e={name:"Focus"},r=n.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/swing/i],describe(t){const e={name:"Swing"},r=n.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/coast/i],describe(t){const e={name:"Opera Coast"},r=n.getFirstMatch(a,t)||n.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){const e={name:"Opera Touch"},r=n.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/yabrowser/i],describe(t){const e={name:"Yandex Browser"},r=n.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/ucbrowser/i],describe(t){const e={name:"UC Browser"},r=n.getFirstMatch(a,t)||n.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/Maxthon|mxios/i],describe(t){const e={name:"Maxthon"},r=n.getFirstMatch(a,t)||n.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/epiphany/i],describe(t){const e={name:"Epiphany"},r=n.getFirstMatch(a,t)||n.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/puffin/i],describe(t){const e={name:"Puffin"},r=n.getFirstMatch(a,t)||n.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sleipnir/i],describe(t){const e={name:"Sleipnir"},r=n.getFirstMatch(a,t)||n.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/k-meleon/i],describe(t){const e={name:"K-Meleon"},r=n.getFirstMatch(a,t)||n.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/micromessenger/i],describe(t){const e={name:"WeChat"},r=n.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/qqbrowser/i],describe(t){const e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},r=n.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/msie|trident/i],describe(t){const e={name:"Internet Explorer"},r=n.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/\sedg\//i],describe(t){const e={name:"Microsoft Edge"},r=n.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/edg([ea]|ios)/i],describe(t){const e={name:"Microsoft Edge"},r=n.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/vivaldi/i],describe(t){const e={name:"Vivaldi"},r=n.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/seamonkey/i],describe(t){const e={name:"SeaMonkey"},r=n.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/sailfish/i],describe(t){const e={name:"Sailfish"},r=n.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return r&&(e.version=r),e}},{test:[/silk/i],describe(t){const e={name:"Amazon Silk"},r=n.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/phantom/i],describe(t){const e={name:"PhantomJS"},r=n.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/slimerjs/i],describe(t){const e={name:"SlimerJS"},r=n.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e={name:"BlackBerry"},r=n.getFirstMatch(a,t)||n.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(web|hpw)[o0]s/i],describe(t){const e={name:"WebOS Browser"},r=n.getFirstMatch(a,t)||n.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/bada/i],describe(t){const e={name:"Bada"},r=n.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/tizen/i],describe(t){const e={name:"Tizen"},r=n.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/qupzilla/i],describe(t){const e={name:"QupZilla"},r=n.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){const e={name:"Firefox"},r=n.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/electron/i],describe(t){const e={name:"Electron"},r=n.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/MiuiBrowser/i],describe(t){const e={name:"Miui"},r=n.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/chromium/i],describe(t){const e={name:"Chromium"},r=n.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/chrome|crios|crmo/i],describe(t){const e={name:"Chrome"},r=n.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/GSA/i],describe(t){const e={name:"Google Search"},r=n.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e={name:"Android Browser"},r=n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/playstation 4/i],describe(t){const e={name:"PlayStation 4"},r=n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/safari|applewebkit/i],describe(t){const e={name:"Safari"},r=n.getFirstMatch(a,t);return r&&(e.version=r),e}},{test:[/.*/i],describe(t){const e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:n.getFirstMatch(e,t),version:n.getSecondMatch(e,t)}}}];var c=[{test:[/Roku\/DVP/],describe(t){const e=n.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:i.Roku,version:e}}},{test:[/windows phone/i],describe(t){const e=n.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:i.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){const e=n.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),r=n.getWindowsVersionName(e);return{name:i.Windows,version:e,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){const e={name:i.iOS},r=n.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return r&&(e.version=r),e}},{test:[/macintosh/i],describe(t){const e=n.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),r=n.getMacOSVersionName(e),s={name:i.MacOS,version:e};return r&&(s.versionName=r),s}},{test:[/(ipod|iphone|ipad)/i],describe(t){const e=n.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:i.iOS,version:e}}},{test(t){const e=!t.test(/like android/i),r=t.test(/android/i);return e&&r},describe(t){const e=n.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),r=n.getAndroidVersionName(e),s={name:i.Android,version:e};return r&&(s.versionName=r),s}},{test:[/(web|hpw)[o0]s/i],describe(t){const e=n.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),r={name:i.WebOS};return e&&e.length&&(r.version=e),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){const e=n.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||n.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||n.getFirstMatch(/\bbb(\d+)/i,t);return{name:i.BlackBerry,version:e}}},{test:[/bada/i],describe(t){const e=n.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:i.Bada,version:e}}},{test:[/tizen/i],describe(t){const e=n.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:i.Tizen,version:e}}},{test:[/linux/i],describe:()=>({name:i.Linux})},{test:[/CrOS/],describe:()=>({name:i.ChromeOS})},{test:[/PlayStation 4/],describe(t){const e=n.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:i.PlayStation4,version:e}}}],u=[{test:[/googlebot/i],describe:()=>({type:"bot",vendor:"Google"})},{test:[/huawei/i],describe(t){const e=n.getFirstMatch(/(can-l01)/i,t)&&"Nova",r={type:s.mobile,vendor:"Huawei"};return e&&(r.model=e),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:()=>({type:s.tablet,vendor:"Nexus"})},{test:[/ipad/i],describe:()=>({type:s.tablet,vendor:"Apple",model:"iPad"})},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:()=>({type:s.tablet,vendor:"Apple",model:"iPad"})},{test:[/kftt build/i],describe:()=>({type:s.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"})},{test:[/silk/i],describe:()=>({type:s.tablet,vendor:"Amazon"})},{test:[/tablet(?! pc)/i],describe:()=>({type:s.tablet})},{test(t){const e=t.test(/ipod|iphone/i),r=t.test(/like (ipod|iphone)/i);return e&&!r},describe(t){const e=n.getFirstMatch(/(ipod|iphone)/i,t);return{type:s.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:()=>({type:s.mobile,vendor:"Nexus"})},{test:[/[^-]mobi/i],describe:()=>({type:s.mobile})},{test:t=>"blackberry"===t.getBrowserName(!0),describe:()=>({type:s.mobile,vendor:"BlackBerry"})},{test:t=>"bada"===t.getBrowserName(!0),describe:()=>({type:s.mobile})},{test:t=>"windows phone"===t.getBrowserName(),describe:()=>({type:s.mobile,vendor:"Microsoft"})},{test(t){const e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:()=>({type:s.tablet})},{test:t=>"android"===t.getOSName(!0),describe:()=>({type:s.mobile})},{test:t=>"macos"===t.getOSName(!0),describe:()=>({type:s.desktop,vendor:"Apple"})},{test:t=>"windows"===t.getOSName(!0),describe:()=>({type:s.desktop})},{test:t=>"linux"===t.getOSName(!0),describe:()=>({type:s.desktop})},{test:t=>"playstation 4"===t.getOSName(!0),describe:()=>({type:s.tv})},{test:t=>"roku"===t.getOSName(!0),describe:()=>({type:s.tv})}],l=[{test:t=>"microsoft edge"===t.getBrowserName(!0),describe(t){if(/\sedg\//i.test(t))return{name:o.Blink};const e=n.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:o.EdgeHTML,version:e}}},{test:[/trident/i],describe(t){const e={name:o.Trident},r=n.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:t=>t.test(/presto/i),describe(t){const e={name:o.Presto},r=n.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test(t){const e=t.test(/gecko/i),r=t.test(/like gecko/i);return e&&!r},describe(t){const e={name:o.Gecko},r=n.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}},{test:[/(apple)?webkit\/537\.36/i],describe:()=>({name:o.Blink})},{test:[/(apple)?webkit/i],describe(t){const e={name:o.WebKit},r=n.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return r&&(e.version=r),e}}];class _{constructor(t,e=!1){if(null==t||""===t)throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==e&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=n.find(d,t=>{if("function"==typeof t.test)return t.test(this);if(t.test instanceof Array)return t.test.some(t=>this.test(t));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=n.find(c,t=>{if("function"==typeof t.test)return t.test(this);if(t.test instanceof Array)return t.test.some(t=>this.test(t));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:e}=this.getOS();return t?String(e).toLowerCase()||"":e||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:e}=this.getPlatform();return t?String(e).toLowerCase()||"":e||""}parsePlatform(){this.parsedResult.platform={};const t=n.find(u,t=>{if("function"==typeof t.test)return t.test(this);if(t.test instanceof Array)return t.test.some(t=>this.test(t));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=n.find(l,t=>{if("function"==typeof t.test)return t.test(this);if(t.test instanceof Array)return t.test.some(t=>this.test(t));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return n.assign({},this.parsedResult)}satisfies(t){const e={};let r=0;const s={};let i=0;if(Object.keys(t).forEach(o=>{const n=t[o];"string"==typeof n?(s[o]=n,i+=1):"object"==typeof n&&(e[o]=n,r+=1)}),r>0){const t=Object.keys(e),r=n.find(t,t=>this.isOS(t));if(r){const t=this.satisfies(e[r]);if(void 0!==t)return t}const s=n.find(t,t=>this.isPlatform(t));if(s){const t=this.satisfies(e[s]);if(void 0!==t)return t}}if(i>0){const t=Object.keys(s),e=n.find(t,t=>this.isBrowser(t,!0));if(void 0!==e)return this.compareVersion(s[e])}}isBrowser(t,e=!1){const r=this.getBrowserName().toLowerCase();let s=t.toLowerCase();const i=n.getBrowserTypeByAlias(s);return e&&i&&(s=i.toLowerCase()),s===r}compareVersion(t){let e=[0],r=t,s=!1;const i=this.getBrowserVersion();if("string"==typeof i)return">"===t[0]||"<"===t[0]?(r=t.substr(1),"="===t[1]?(s=!0,r=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?r=t.substr(1):"~"===t[0]&&(s=!0,r=t.substr(1)),e.indexOf(n.compareVersions(i,r,s))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,e=!1){return this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(t=>this.is(t))}}
|
|
2
|
-
/*!
|
|
3
|
-
* Bowser - a browser detector
|
|
4
|
-
* https://github.com/lancedikson/bowser
|
|
5
|
-
* MIT License | (c) Dustin Diaz 2012-2015
|
|
6
|
-
* MIT License | (c) Denis Demchenko 2015-2019
|
|
7
|
-
*/var h=[{id:"Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 05c4)",friendlyName:"PS4",browser:"Chrome",os:"Windows",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15,vendor:16}},{id:"054c-05c4-Wireless Controller",friendlyName:"PS4",browser:"Firefox",os:"Windows",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15,vendor:16}},{id:"Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 05c4)",friendlyName:"PS4",browser:"Microsoft Edge",os:"Windows",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15,vendor:16}},{id:"Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 05c4)",friendlyName:"PS4",browser:"Opera",os:"macOS",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15,vendor:16}},{id:"Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 05c4)",friendlyName:"PS4",browser:"Opera",os:"Windows",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15,vendor:16}},{id:"Pro Controller (STANDARD GAMEPAD Vendor: 057e Product: 2009)",friendlyName:"Switch Pro",browser:"Chrome",os:"macOS",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15,vendor:16}},{id:"Pro Controller (STANDARD GAMEPAD Vendor: 057e Product: 2009)",friendlyName:"Switch Pro",browser:"Chrome",os:"Windows",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15,vendor:16}},{id:"Pro Controller (STANDARD GAMEPAD Vendor: 057e Product: 2009)",friendlyName:"Switch Pro",browser:"Opera",os:"macOS",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15,vendor:16}},{id:"Xbox One Wired Controller (STANDARD GAMEPAD Vendor: 045e Product: 02d1)",friendlyName:"Xbox One",browser:"Chrome",os:"macOS",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15,vendor:16}},{id:"Xbox 360 Controller (XInput STANDARD GAMEPAD)",friendlyName:"Xbox One",browser:"Chrome",os:"Windows",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15}},{id:"45e-2d1-Xbox One Wired Controller",friendlyName:"Xbox One",browser:"Firefox",os:"macOS",buttons:{button_1:11,button_2:12,button_3:13,button_4:14,shoulder_top_left:8,shoulder_top_right:9,select:5,start:4,stick_button_left:6,stick_button_right:7,d_pad_up:0,d_pad_down:1,d_pad_left:2,d_pad_right:3,vendor:10}},{id:"xinput",friendlyName:"Xbox One",browser:"Firefox",os:"Windows",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15}},{id:"Xbox 360 Controller (XInput STANDARD GAMEPAD)",friendlyName:"Xbox One",browser:"Microsoft Edge",os:"Windows",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15}},{id:"Xbox One Wired Controller (STANDARD GAMEPAD Vendor: 045e Product: 02d1)",friendlyName:"Xbox One",browser:"Opera",os:"macOS",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15,vendor:16}},{id:"Xbox 360 Controller (XInput STANDARD GAMEPAD)",friendlyName:"Xbox One",browser:"Opera",os:"Windows",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,shoulder_bottom_left:6,shoulder_bottom_right:7,select:8,start:9,stick_button_left:10,stick_button_right:11,d_pad_up:12,d_pad_down:13,d_pad_left:14,d_pad_right:15}},{id:"45e-2d1-Xbox One Wired Controller",friendlyName:"Xbox One",browser:"Safari",os:"macOS",buttons:{button_1:0,button_2:1,button_3:2,button_4:3,shoulder_top_left:4,shoulder_top_right:5,select:9,start:8,stick_button_left:6,stick_button_right:7,d_pad_up:11,d_pad_down:12,d_pad_left:13,d_pad_right:14,vendor:10}}],b=class{static getParser(t,e=!1){if("string"!=typeof t)throw new Error("UserAgent should be a string");return new _(t,e)}static parse(t){return new _(t).getResult()}static get BROWSER_MAP(){return r}static get ENGINE_MAP(){return o}static get OS_MAP(){return i}static get PLATFORMS_MAP(){return s}}.getParser(window.navigator.userAgent),p=function(){var e=this;this._requestAnimation=0,this._previousGamepadsState=[],this.listeners=[],this.start=function(){e._requestAnimation=window.requestAnimationFrame(e.tick)},this.stop=function(){window.cancelAnimationFrame(e._requestAnimation)},this.on=function(t,r,s){e.listeners[e.listeners.length]={type:t,id:r,callback:s}},this.off=function(t,r){e.listeners[e.listeners.length].splice(e.listeners.findIndex(function(e){return e.type===t&&e.id===r}),1)},this.tick=function(){var r=[].slice.call(window.navigator.getGamepads()).filter(function(t){return t}).map(function(e){var r=e.id,s=e.index,i=e.buttons,o=e.axes,n=h.find(function(t){return t.id===r&&t.browser===b.getBrowserName()&&t.os===b.getOSName()});if(!n)throw new Error("".concat(r," not supported by gamepad.js"));return{id:r,index:s,buttons:Object.keys(n.buttons).reduce(function(e,r){var s;return t(t({},e),((s={})[r]=i[n.buttons[r]],s))},{}),axes:o,mapping:n}});r.map(function(t){var r=e._previousGamepadsState.find(function(e){var r=e.index;return t.index===r});e.listeners.filter(function(e){var r=e.id;return t.buttons[r]}).filter(function(e){var s=e.type,i=e.id;switch(s){case"pressed":return t.buttons[i].pressed&&(!r||!r.buttons[i].pressed);case"held":return t.buttons[i].pressed;case"released":return!t.buttons[i].pressed&&r&&r.buttons[i].pressed;default:return!1}}).map(function(e){var r=e.callback,s=e.id;return r({id:s,gamepadIndex:t.index,value:t.buttons[s].value})})}),r.map(function(t){e.listeners.filter(function(t){return"axes"===t.type}).filter(function(e){var r=e.id;return Math.abs(t.axes[r])>.1}).map(function(e){var r=e.callback,s=e.id;return r({id:s,gamepadIndex:t.index,value:t.axes[s]})})}),e._previousGamepadsState=r,e._requestAnimation=window.requestAnimationFrame(e.tick)}};export{p as Gamepad};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{y as e,N as t}from"./graph-a2efb7be-713af9a6.js";import{u as n,V as r}from"./layout-f41a9481-b65a914c.js";import{a as i}from"./clone-e72fc4b8-e0d9c611.js";import{c as a,$ as o,U as d,g as s,E as c,C as l,A as h,R as g,P as f,G as u,q as w,y as p,b as v}from"./edges-e0da2a9e-fba3c3a7-06d257f8.js";import{i as y,F as m,l as x,v as b}from"./index-0c25c9f2.js";import{s as N}from"./createText-2e5e7dd3-3d197991-1dc23da3.js";function C(t){var n={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:E(t),edges:X(t)};return e(t.graph())||(n.value=i(t.graph())),n}function E(t){return n(t.nodes(),function(n){var r=t.node(n),i=t.parent(n),a={v:n};return e(r)||(a.value=r),e(i)||(a.parent=i),a})}function X(t){return n(t.edges(),function(n){var r=t.edge(n),i={v:n.v,w:n.w};return e(n.name)||(i.name=n.name),e(r)||(i.value=r),i})}let S={},T={},B={};const D=(e,t)=>(y.trace("In isDescendant",t," ",e," = ",T[t].includes(e)),!!T[t].includes(e)),O=(e,t,n,r)=>{y.warn("Copying children of ",e,"root",r,"data",t.node(e),r);const i=t.children(e)||[];e!==r&&i.push(e),y.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach(i=>{if(t.children(i).length>0)O(i,t,n,r);else{const a=t.node(i);y.info("cp ",i," to ",r," with parent ",e),n.setNode(i,a),r!==t.parent(i)&&(y.warn("Setting parent",i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(y.debug("Setting parent",i,e),n.setParent(i,e)):(y.info("In copy ",e,"root",r,"data",t.node(e),r),y.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const o=t.edges(i);y.debug("Copying Edges",o),o.forEach(i=>{y.info("Edge",i);const a=t.edge(i.v,i.w,i.name);y.info("Edge data",a,r);try{((e,t)=>(y.info("Descendants of ",t," is ",T[t]),y.info("Edge is ",e),e.v!==t&&e.w!==t&&(T[t]?T[t].includes(e.v)||D(e.v,t)||D(e.w,t)||T[t].includes(e.w):(y.debug("Tilt, ",t,",not in descendants"),!1))))(i,r)?(y.info("Copying as ",i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),y.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):y.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",e)}catch(e){y.error(e)}})}y.debug("Removing node",i),t.removeNode(i)})},J=(e,t)=>{const n=t.children(e);let r=[...n];for(const i of n)B[i]=e,r=[...r,...J(i,t)];return r},G=(e,t)=>{y.trace("Searching",e);const n=t.children(e);if(y.trace("Searching children of id ",e,n),n.length<1)return y.trace("This is a valid node",e),e;for(const r of n){const n=G(r,t);if(n)return y.trace("Found replacement for",e," => ",n),n}},R=e=>S[e]&&S[e].externalConnections&&S[e]?S[e].id:e,I=(e,n)=>{if(y.warn("extractor - ",n,C(e),e.children("D")),n>10)return void y.error("Bailing out");let r=e.nodes(),i=!1;for(const t of r){const n=e.children(t);i=i||n.length>0}if(i){y.debug("Nodes = ",r,n);for(const i of r)if(y.debug("Extracting node",i,S,S[i]&&!S[i].externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",n),S[i])if(!S[i].externalConnections&&e.children(i)&&e.children(i).length>0){y.warn("Cluster without external connections, without a parent and with children",i,n);let r="TB"===e.graph().rankdir?"LR":"TB";S[i]&&S[i].clusterData&&S[i].clusterData.dir&&(r=S[i].clusterData.dir,y.warn("Fixing dir",S[i].clusterData.dir,r));const a=new t({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});y.warn("Old graph before copy",C(e)),O(i,e,a,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:S[i].clusterData,labelText:S[i].labelText,graph:a}),y.warn("New graph after copy node: (",i,")",C(a)),y.debug("Old graph after copy",C(e))}else y.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!S[i].externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),n),y.debug(S);else y.debug("Not a cluster",i,n);r=e.nodes(),y.warn("New list of nodes",r);for(const t of r){const r=e.node(t);y.warn(" Now next level",t,r),r.clusterNode&&I(r.graph,n+1)}}else y.debug("Done, no node has children",e.nodes())},j=(e,t)=>{if(0===t.length)return[];let n=Object.assign(t);return t.forEach(t=>{const r=e.children(t),i=j(e,r);n=[...n,...i]}),n},F={rect:(e,t)=>{y.info("Creating subgraph rect for ",t.id,t);const n=m(),r=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),i=r.insert("rect",":first-child"),a=x(n.flowchart.htmlLabels),o=r.insert("g").attr("class","cluster-label"),d="markdown"===t.labelType?N(o,t.labelText,{style:t.labelStyle,useHtmlLabels:a}):o.node().appendChild(p(t.labelText,t.labelStyle,void 0,!0));let s=d.getBBox();if(x(n.flowchart.htmlLabels)){const e=d.children[0],t=b(d);s=e.getBoundingClientRect(),t.attr("width",s.width),t.attr("height",s.height)}const c=0*t.padding,l=c/2,h=t.width<=s.width+c?s.width+c:t.width;t.width<=s.width+c?t.diff=(s.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,y.trace("Data ",t,JSON.stringify(t)),i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-h/2).attr("y",t.y-t.height/2-l).attr("width",h).attr("height",t.height+c);const{subGraphTitleTopMargin:f}=g(n);a?o.attr("transform",`translate(${t.x-s.width/2}, ${t.y-t.height/2+f})`):o.attr("transform",`translate(${t.x}, ${t.y-t.height/2+f})`);const u=i.node().getBBox();return t.width=u.width,t.height=u.height,t.intersect=function(e){return v(t,e)},r},roundedWithTitle:(e,t)=>{const n=m(),r=e.insert("g").attr("class",t.classes).attr("id",t.id),i=r.insert("rect",":first-child"),a=r.insert("g").attr("class","cluster-label"),o=r.append("rect"),d=a.node().appendChild(p(t.labelText,t.labelStyle,void 0,!0));let s=d.getBBox();if(x(n.flowchart.htmlLabels)){const e=d.children[0],t=b(d);s=e.getBoundingClientRect(),t.attr("width",s.width),t.attr("height",s.height)}s=d.getBBox();const c=0*t.padding,l=c/2,h=t.width<=s.width+t.padding?s.width+t.padding:t.width;t.width<=s.width+t.padding?t.diff=(s.width+0*t.padding-t.width)/2:t.diff=-t.padding/2,i.attr("class","outer").attr("x",t.x-h/2-l).attr("y",t.y-t.height/2-l).attr("width",h+c).attr("height",t.height+c),o.attr("class","inner").attr("x",t.x-h/2-l).attr("y",t.y-t.height/2-l+s.height-1).attr("width",h+c).attr("height",t.height+c-s.height-3);const{subGraphTitleTopMargin:f}=g(n);a.attr("transform",`translate(${t.x-s.width/2}, ${t.y-t.height/2-t.padding/3+(x(n.flowchart.htmlLabels)?5:3)+f})`);const u=i.node().getBBox();return t.height=u.height,t.intersect=function(e){return v(t,e)},r},noteGroup:(e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),i=0*t.padding,a=i/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none");const o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return v(t,e)},n},divider:(e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),i=0*t.padding,a=i/2;r.attr("class","divider").attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2).attr("width",t.width+i).attr("height",t.height+i);const o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.diff=-t.padding/2,t.intersect=function(e){return v(t,e)},n}};let L={};const k=async(e,t,n,i,a,o)=>{y.info("Graph in recursive render: XXX",C(t),a);const d=t.graph().rankdir;y.trace("Dir in recursive render - dir:",d);const p=e.insert("g").attr("class","root");t.nodes()?y.info("Recursive render XXX",t.nodes()):y.info("No nodes found for",t),t.edges().length>0&&y.trace("Recursive edges",t.edge(t.edges()[0]));const v=p.insert("g").attr("class","clusters"),m=p.insert("g").attr("class","edgePaths"),x=p.insert("g").attr("class","edgeLabels"),b=p.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(e){const r=t.node(e);if(void 0!==a){const n=JSON.parse(JSON.stringify(a.clusterData));y.info("Setting data for cluster XXX (",e,") ",n,a),t.setNode(a.id,n),t.parent(e)||(y.trace("Setting parent",e,a.id),t.setParent(e,a.id,n))}if(y.info("(Insert) Node XXX"+e+": "+JSON.stringify(t.node(e))),r&&r.clusterNode){y.info("Cluster identified",e,r.width,t.node(e));const a=await k(b,r.graph,n,i,t.node(e),o),d=a.elem;s(r,d),r.diff=a.diff||0,y.info("Node bounds (abc123)",e,r,r.width,r.x,r.y),c(d,r),y.warn("Recursive render complete ",d,r)}else t.children(e).length>0?(y.info("Cluster - the non recursive path XXX",e,r.id,r,t),y.info(G(r.id,t)),S[r.id]={id:G(r.id,t),node:r}):(y.info("Node - the non recursive path",e,r.id,r),await l(b,t.node(e),d))})),t.edges().forEach(function(e){const n=t.edge(e.v,e.w,e.name);y.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),y.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),y.info("Fix",S,"ids:",e.v,e.w,"Translating: ",S[e.v],S[e.w]),h(x,n)}),t.edges().forEach(function(e){y.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e))}),y.info("#############################################"),y.info("### Layout ###"),y.info("#############################################"),y.info(t),r(t),y.info("Graph after layout:",C(t));let N=0;const{subGraphTitleTotalMargin:E}=g(o);return(e=>j(e,e.children()))(t).forEach(function(e){const n=t.node(e);y.info("Position "+e+": "+JSON.stringify(t.node(e))),y.info("Position "+e+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n&&n.clusterNode?(n.y+=E,f(n)):t.children(e).length>0?(n.height+=E,((e,t)=>{y.trace("Inserting cluster");const n=t.shape||"rect";L[t.id]=F[n](e,t)})(v,n),S[n.id].node=n):(n.y+=E/2,f(n))}),t.edges().forEach(function(e){const r=t.edge(e);y.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(r),r),r.points.forEach(e=>e.y+=E/2);const a=u(m,e,r,S,n,t,i);w(r,a)}),t.nodes().forEach(function(e){const n=t.node(e);y.info(e,n.type,n.diff),"group"===n.type&&(N=n.diff)}),{elem:p,diff:N}},P=async(e,t,n,r,i)=>{a(e,n,r,i),o(),d(),L={},T={},B={},S={},y.warn("Graph at first:",JSON.stringify(C(t))),(e=>{if(e){y.debug("Opting in, graph "),e.nodes().forEach(function(t){e.children(t).length>0&&(y.warn("Cluster identified",t," Replacement id in edges: ",G(t,e)),T[t]=J(t,e),S[t]={id:G(t,e),clusterData:e.node(t)})}),e.nodes().forEach(function(t){const n=e.children(t),r=e.edges();n.length>0?(y.debug("Cluster identified",t,T),r.forEach(e=>{e.v!==t&&e.w!==t&&D(e.v,t)^D(e.w,t)&&(y.warn("Edge: ",e," leaves cluster ",t),y.warn("Descendants of XXX ",t,": ",T[t]),S[t].externalConnections=!0)})):y.debug("Not a cluster ",t,T)});for(let t of Object.keys(S)){const n=S[t].id,r=e.parent(n);r!==t&&S[r]&&!S[r].externalConnections&&(S[t].id=r)}e.edges().forEach(function(t){const n=e.edge(t);y.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),y.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(y.warn("Fix XXX",S,"ids:",t.v,t.w,"Translating: ",S[t.v]," --- ",S[t.w]),S[t.v]&&S[t.w]&&S[t.v]===S[t.w]){y.warn("Fixing and trixing link to self - removing XXX",t.v,t.w,t.name),y.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),r=R(t.v),i=R(t.w),e.removeEdge(t.v,t.w,t.name);const a=t.w+"---"+t.v;e.setNode(a,{domId:a,id:a,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const o=structuredClone(n),d=structuredClone(n);o.label="",o.arrowTypeEnd="none",d.label="",o.fromCluster=t.v,d.toCluster=t.v,e.setEdge(r,a,o,t.name+"-cyclic-special"),e.setEdge(a,i,d,t.name+"-cyclic-special")}else if(S[t.v]||S[t.w]){if(y.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),r=R(t.v),i=R(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){const i=e.parent(r);S[i].externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){const r=e.parent(i);S[r].externalConnections=!0,n.toCluster=t.w}y.warn("Fix Replacing with XXX",r,i,t.name),e.setEdge(r,i,n,t.name)}}),y.warn("Adjusted Graph",C(e)),I(e,0),y.trace(S)}else y.debug("Opting out, no graph ")})(t),y.warn("Graph after:",JSON.stringify(C(t)));const s=m();await k(e,t,r,i,void 0,s)};export{P};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as t,r as e,D as n,P as i,A as s,M as r,N as a,R as o,v as l,E as c}from"./index-0c25c9f2.js";import{e as h,r as u,o as y}from"./svgDrawCommon-08f97a94-12aefbff-7bed41c9.js";import{T as p}from"./arc-0fffff1f-cb15888d.js";import"react";import"react-dom";import"stream";import"./path-5bb65086-3ae6d6fa.js";var d=function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],r=[1,12],a=[1,13],o=[1,14],l={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=[0],n=[],i=[null],s=[],r=this.table,a="",o=0,l=0,c=s.slice.call(arguments,1),h=Object.create(this.lexer),u={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(u.yy[y]=this.yy[y]);h.setInput(t,u.yy),u.yy.lexer=h,u.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var p=h.yylloc;s.push(p);var d=h.options&&h.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,g,m,x,k,_,b,v,$,w={};;){if(g=e[e.length-1],this.defaultActions[g]?m=this.defaultActions[g]:(null==f&&($=void 0,"number"!=typeof($=n.pop()||h.lex()||1)&&($ instanceof Array&&($=(n=$).pop()),$=this.symbols_[$]||$),f=$),m=r[g]&&r[g][f]),void 0===m||!m.length||!m[0]){var M;for(k in v=[],r[g])this.terminals_[k]&&k>2&&v.push("'"+this.terminals_[k]+"'");M=h.showPosition?"Parse error on line "+(o+1)+":\n"+h.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(M,{text:h.match,token:this.terminals_[f]||f,line:h.yylineno,loc:p,expected:v})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+f);switch(m[0]){case 1:e.push(f),i.push(h.yytext),s.push(h.yylloc),e.push(m[1]),f=null,l=h.yyleng,a=h.yytext,o=h.yylineno,p=h.yylloc;break;case 2:if(_=this.productions_[m[1]][1],w.$=i[i.length-_],w._$={first_line:s[s.length-(_||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(_||1)].first_column,last_column:s[s.length-1].last_column},d&&(w._$.range=[s[s.length-(_||1)].range[0],s[s.length-1].range[1]]),void 0!==(x=this.performAction.apply(w,[a,l,o,u.yy,m[1],i,s].concat(c))))return x;_&&(e=e.slice(0,-1*_*2),i=i.slice(0,-1*_),s=s.slice(0,-1*_)),e.push(this.productions_[m[1]][0]),i.push(w.$),s.push(w._$),b=r[e[e.length-2]][e[e.length-1]],e.push(b);break;case 3:return!0}}return!0}},c={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};function h(){this.yy={}}return l.lexer=c,h.prototype=l,l.Parser=h,new h}();d.parser=d;const f=d;let g="";const m=[],x=[],k=[],_=function(){let t=!0;for(const[e,n]of k.entries())k[e].processed,t=t&&n.processed;return t},b={getConfig:()=>t().journey,clear:function(){m.length=0,x.length=0,g="",k.length=0,e()},setDiagramTitle:n,getDiagramTitle:i,setAccTitle:s,getAccTitle:r,setAccDescription:a,getAccDescription:o,addSection:function(t){g=t,m.push(t)},getSections:function(){return m},getTasks:function(){let t=_(),e=0;for(;!t&&e<100;)t=_(),e++;return x.push(...k),x},addTask:function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map(t=>t.trim()),a={section:g,type:g,people:r,task:t,score:i};k.push(a)},addTaskOrg:function(t){const e={section:g,type:g,description:t,task:t,classes:[]};x.push(e)},getActors:function(){return function(){const t=[];return x.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()}()}},v=function(t,e){return u(t,e)},$=function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n};let w=-1;const M=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,y=t.split(/<br\s*\/?>/gi);for(let t=0;t<y.length;t++){const l=t*h-h*(y.length-1)/2,p=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);p.append("tspan").attr("x",n+r/2).attr("dy",l).text(y[t]),p.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(p,o)}}function n(t,n,s,r,a,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,l,c),i(u,l)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),T=$,E=function(t,e,n){const i=t.append("g"),s=y();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),s.height=n.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,v(i,s),M(n)(e.text,i,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},n,e.colour)},S=function(t,e){return h(t,e)},A=function(t,e,n){const i=e.x+n.width/2,s=t.append("g");w++,s.append("line").attr("id","task"+w).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),function(t,e){t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");const n=t.append("g");n.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.score>3?function(t){const n=p().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}(n):e.score<3?function(t){const n=p().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}(n):n.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(s,{cx:i,cy:300+30*(5-e.score),score:e.score});const r=y();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width,r.height=n.height,r.class="task task-type-"+e.num,r.rx=3,r.ry=3,v(s,r);let a=e.x+14;e.people.forEach(t=>{const n=e.actors[t].color,i={cx:a,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};$(s,i),a+=10}),M(n)(e.task,s,r.x,r.y,r.width,r.height,{class:"task"},n,e.colour)},I={},P=t().journey,j=P.leftMargin,C={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},updateBounds:function(e,n,i,s){const r=t().journey,a=this;let o=0;this.sequenceItems.forEach(function(t){o++;const l=a.sequenceItems.length-o+1;a.updateVal(t,"starty",n-l*r.boxMargin,Math.min),a.updateVal(t,"stopy",s+l*r.boxMargin,Math.max),a.updateVal(C.data,"startx",e-l*r.boxMargin,Math.min),a.updateVal(C.data,"stopx",i+l*r.boxMargin,Math.max),a.updateVal(t,"startx",e-l*r.boxMargin,Math.min),a.updateVal(t,"stopx",i+l*r.boxMargin,Math.max),a.updateVal(C.data,"starty",n-l*r.boxMargin,Math.min),a.updateVal(C.data,"stopy",s+l*r.boxMargin,Math.max)})},insert:function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(C.data,"startx",s,Math.min),this.updateVal(C.data,"starty",a,Math.min),this.updateVal(C.data,"stopx",r,Math.max),this.updateVal(C.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},V=P.sectionFills,D=P.sectionColours,O={setConf:function(t){Object.keys(t).forEach(function(e){P[e]=t[e]})},draw:function(e,n,i,s){const r=t().journey,a=t().securityLevel;let o;"sandbox"===a&&(o=l("#i"+n));const h=l("sandbox"===a?o.nodes()[0].contentDocument.body:"body");C.init();const u=h.select("#"+n);u.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z");const y=s.db.getTasks(),p=s.db.getDiagramTitle(),d=s.db.getActors();for(const t in I)delete I[t];let f=0;d.forEach(t=>{I[t]={color:r.actorColours[f%r.actorColours.length],position:f},f++}),function(e){const n=t().journey;let i=60;Object.keys(I).forEach(t=>{const s=I[t].color,r={cx:20,cy:i,r:7,fill:s,stroke:"#000",pos:I[t].position};T(e,r);const a={x:40,y:i+7,fill:"#666",text:t,textMargin:5|n.boxTextMargin};S(e,a),i+=20})}(u),C.insert(0,0,j,50*Object.keys(I).length),function(e,n,i){const s=t().journey;let r="";const a=i+(2*s.height+s.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[t,i]of n.entries()){if(r!==i.section){l=V[o%V.length],h=o%V.length,c=D[o%D.length];let a=0;const u=i.section;for(let e=t;e<n.length&&n[e].section==u;e++)a+=1;const y={x:t*s.taskMargin+t*s.width+j,y:50,text:i.section,fill:l,num:h,colour:c,taskCount:a};E(e,y,s),r=i.section,o++}const u=i.people.reduce((t,e)=>(I[e]&&(t[e]=I[e]),t),{});i.x=t*s.taskMargin+t*s.width+j,i.y=a,i.width=s.diagramMarginX,i.height=s.diagramMarginY,i.colour=c,i.fill=l,i.num=h,i.actors=u,A(e,i,s),C.insert(i.x,i.y,i.x+i.width+s.taskMargin,450)}}(u,y,0);const g=C.getBounds();p&&u.append("text").text(p).attr("x",j).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const m=g.stopy-g.starty+2*r.diagramMarginY,x=j+g.stopx+2*r.diagramMarginX;c(u,m,x,r.useMaxWidth),u.append("line").attr("x1",j).attr("y1",4*r.height).attr("x2",x-j-4).attr("y2",4*r.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const k=p?70:0;u.attr("viewBox",`${g.startx} -25 ${x} ${m+k}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",m+k+25)}},F={parser:f,db:b,renderer:O,styles:t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`,init:t=>{O.setConf(t.journey),b.clear()}};export{F as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as n,B as e,u as r,s as t,n as o,f as i,o as u,z as a,a as d,N as c,d as f,y as s,g,b as h,j as v,w as l,c as p,I as w,i as m,l as b,T as y,W as x}from"./graph-a2efb7be-713af9a6.js";import{ac as k,ad as E,ae as N,af as _,ag as I,ah as R,ai as M,aj as T,ak as L,al as C,am as O,an as P,ao as S,ap as j,aq as V,ar as F,as as G,at as B}from"./index-0c25c9f2.js";var q=/\s/,Y=/^\s+/;var z=/^[-+]0x[0-9a-f]+$/i,A=/^0b[01]+$/i,D=/^0o[0-7]+$/i,$=parseInt,J=1/0;function W(n){return n?(n=function(n){if("number"==typeof n)return n;if(a(n))return NaN;if(L(n)){var e="function"==typeof n.valueOf?n.valueOf():n;n=L(e)?e+"":e}if("string"!=typeof n)return 0===n?n:+n;var r;n=(r=n)?r.slice(0,function(n){for(var e=n.length;e--&&q.test(n.charAt(e)););return e}(r)+1).replace(Y,""):r;var t=A.test(n);return t||D.test(n)?$(n.slice(2),t?2:8):z.test(n)?NaN:+n}(n))===J||n===-1/0?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}function H(e){return null!=e&&e.length?n(e,1):[]}var K=Object.prototype,Q=K.hasOwnProperty,U=k(function(n,e){n=Object(n);var r=-1,t=e.length,o=t>2?e[2]:void 0;for(o&&E(e[0],e[1],o)&&(t=1);++r<t;)for(var i=e[r],u=N(i),a=-1,d=u.length;++a<d;){var c=u[a],f=n[c];(void 0===f||_(f,K[c])&&!Q.call(n,c))&&(n[c]=i[c])}return n});function X(n){var e=null==n?0:n.length;return e?n[e-1]:void 0}var Z,nn=Math.max,en=(Z=function(n,e,r){var t=null==n?0:n.length;if(!t)return-1;var o,i,u=null==r?0:(i=(o=W(r))%1,o==o?i?o-i:o:0);return u<0&&(u=nn(t+u,0)),x(n,d(e),u)},function(n,e,r){var t=Object(n);if(!T(n)){var o=d(e);n=y(n),e=function(n){return o(t[n],n,t)}}var i=Z(n,e,r);return i>-1?t[o?n[i]:i]:void 0});function rn(n,e){var r=-1,t=T(n)?Array(n.length):[];return i(n,function(n,o,i){t[++r]=e(n,o,i)}),t}function tn(n,r){return(P(n)?e:rn)(n,d(r))}function on(n,e){return n>e}function un(n,e){return n<e}function an(n,e){var r={};return e=d(e),h(n,function(n,t,o){F(r,t,e(n,t,o))}),r}function dn(n,e,r){for(var t=-1,o=n.length;++t<o;){var i=n[t],u=e(i);if(null!=u&&(void 0===d?u==u&&!a(u):r(u,d)))var d=u,c=i}return c}function cn(n){return n&&n.length?dn(n,M,on):void 0}function fn(n){return n&&n.length?dn(n,M,un):void 0}function sn(n,e){return n&&n.length?dn(n,d(e),un):void 0}function gn(n,e,r,o){if(!L(n))return n;for(var i=-1,a=(e=t(e,n)).length,d=a-1,c=n;null!=c&&++i<a;){var f=u(e[i]),s=r;if("__proto__"===f||"constructor"===f||"prototype"===f)return n;if(i!=d){var g=c[f];void 0===(s=o?o(g,f,c):void 0)&&(s=L(g)?g:C(e[i+1])?[]:{})}O(c,f,s),c=c[f]}return n}function hn(n,e){if(n!==e){var r=void 0!==n,t=null===n,o=n==n,i=a(n),u=void 0!==e,d=null===e,c=e==e,f=a(e);if(!d&&!f&&!i&&n>e||i&&u&&c&&!d&&!f||t&&u&&c||!r&&c||!o)return 1;if(!t&&!i&&!f&&n<e||f&&r&&o&&!t&&!i||d&&r&&o||!u&&o||!c)return-1}return 0}var vn,ln=I(R(vn=function(n,e){return null==n?{}:function(n,e){return function(n,e,o){for(var i=-1,u=e.length,a={};++i<u;){var d=e[i],c=r(n,d);o(c,d)&&gn(a,t(d,n),c)}return a}(n,e,function(e,r){return o(n,r)})}(n,e)},void 0,H),vn+""),pn=Math.ceil,wn=Math.max,mn=function(n,e,r){return r&&"number"!=typeof r&&E(n,e,r)&&(e=r=void 0),n=W(n),void 0===e?(e=n,n=0):e=W(e),function(n,e,r){for(var t=-1,o=wn(pn((e-n)/(r||1)),0),i=Array(o);o--;)i[++t]=n,n+=r;return i}(n,e,r=void 0===r?n<e?1:-1:W(r))},bn=k(function(t,o){if(null==t)return[];var i=o.length;return i>1&&E(t,o[0],o[1])?o=[]:i>2&&E(o[0],o[1],o[2])&&(o=[o[0]]),function(n,t,o){t=t.length?e(t,function(n){return P(n)?function(e){return r(e,1===n.length?n[0]:n)}:n}):[M];var i=-1;return t=e(t,S(d)),function(n,e){var r=n.length;for(n.sort(e);r--;)n[r]=n[r].value;return n}(rn(n,function(n,r,o){return{criteria:e(t,function(e){return e(n)}),index:++i,value:n}}),function(n,e){return function(n,e,r){for(var t=-1,o=n.criteria,i=e.criteria,u=o.length,a=r.length;++t<u;){var d=hn(o[t],i[t]);if(d)return t>=a?d:d*("desc"==r[t]?-1:1)}return n.index-e.index}(n,e,o)})}(t,n(o,1),[])}),yn=0;function xn(n){var e=++yn;return m(n)+e}class kn{constructor(){var n={};n._next=n._prev=n,this._sentinel=n}dequeue(){var n=this._sentinel,e=n._prev;if(e!==n)return En(e),e}enqueue(n){var e=this._sentinel;n._prev&&n._next&&En(n),n._next=e._next,e._next._prev=n,e._next=n,n._prev=e}toString(){for(var n=[],e=this._sentinel,r=e._prev;r!==e;)n.push(JSON.stringify(r,Nn)),r=r._prev;return"["+n.join(", ")+"]"}}function En(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function Nn(n,e){if("_next"!==n&&"_prev"!==n)return e}var _n=G(1);function In(n,e,r,t,o){var i=o?[]:void 0;return f(n.inEdges(t.v),function(t){var u=n.edge(t),a=n.node(t.v);o&&i.push({v:t.v,w:t.w}),a.out-=u,Rn(e,r,a)}),f(n.outEdges(t.v),function(t){var o=n.edge(t),i=t.w,u=n.node(i);u.in-=o,Rn(e,r,u)}),n.removeNode(t.v),i}function Rn(n,e,r){r.out?r.in?n[r.out-r.in+e].enqueue(r):n[n.length-1].enqueue(r):n[0].enqueue(r)}function Mn(n){var e="greedy"===n.graph().acyclicer?function(n,e){if(n.nodeCount()<=1)return[];var r=function(n,e){var r=new c,t=0,o=0;f(n.nodes(),function(n){r.setNode(n,{v:n,in:0,out:0})}),f(n.edges(),function(n){var i=r.edge(n.v,n.w)||0,u=e(n),a=i+u;r.setEdge(n.v,n.w,a),o=Math.max(o,r.node(n.v).out+=u),t=Math.max(t,r.node(n.w).in+=u)});var i=mn(o+t+3).map(function(){return new kn}),u=t+1;return f(r.nodes(),function(n){Rn(i,u,r.node(n))}),{graph:r,buckets:i,zeroIdx:u}}(n,e||_n),t=function(n,e,r){for(var t,o=[],i=e[e.length-1],u=e[0];n.nodeCount();){for(;t=u.dequeue();)In(n,e,r,t);for(;t=i.dequeue();)In(n,e,r,t);if(n.nodeCount())for(var a=e.length-2;a>0;--a)if(t=e[a].dequeue()){o=o.concat(In(n,e,r,t,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return H(tn(t,function(e){return n.outEdges(e.v,e.w)}))}(n,function(n){return function(e){return n.edge(e).weight}}(n)):function(n){var e=[],r={},t={};return f(n.nodes(),function o(i){g(t,i)||(t[i]=!0,r[i]=!0,f(n.outEdges(i),function(n){g(r,n.w)?e.push(n):o(n.w)}),delete r[i])}),e}(n);f(e,function(e){var r=n.edge(e);n.removeEdge(e),r.forwardName=e.name,r.reversed=!0,n.setEdge(e.w,e.v,r,xn("rev"))})}function Tn(n,e,r,t){var o;do{o=xn(t)}while(n.hasNode(o));return r.dummy=e,n.setNode(o,r),o}function Ln(n){var e=new c({multigraph:n.isMultigraph()}).setGraph(n.graph());return f(n.nodes(),function(r){n.children(r).length||e.setNode(r,n.node(r))}),f(n.edges(),function(r){e.setEdge(r,n.edge(r))}),e}function Cn(n,e){var r,t,o=n.x,i=n.y,u=e.x-o,a=e.y-i,d=n.width/2,c=n.height/2;if(!u&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*d>Math.abs(u)*c?(a<0&&(c=-c),r=c*u/a,t=c):(u<0&&(d=-d),r=d,t=d*a/u),{x:o+r,y:i+t}}function On(n){var e=tn(mn(Sn(n)+1),function(){return[]});return f(n.nodes(),function(r){var t=n.node(r),o=t.rank;s(o)||(e[o][t.order]=r)}),e}function Pn(n,e,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),Tn(n,"border",o,e)}function Sn(n){return cn(tn(n.nodes(),function(e){var r=n.node(e).rank;if(!s(r))return r}))}function jn(n,e){V.Date.now();try{return e()}finally{}}function Vn(n,e){return e()}function Fn(n,e,r,t,o,i){var u={width:0,height:0,rank:i,borderType:e},a=o[e][i-1],d=Tn(n,"border",u,r);o[e][i]=d,n.setParent(d,t),a&&n.setEdge(a,d,{weight:1})}function Gn(n){f(n.nodes(),function(e){Bn(n.node(e))}),f(n.edges(),function(e){Bn(n.edge(e))})}function Bn(n){var e=n.width;n.width=n.height,n.height=e}function qn(n){n.y=-n.y}function Yn(n){var e=n.x;n.x=n.y,n.y=e}function zn(n){var e={};f(n.sources(),function r(t){var o=n.node(t);if(g(e,t))return o.rank;e[t]=!0;var i=fn(tn(n.outEdges(t),function(e){return r(e.w)-n.edge(e).minlen}));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i})}function An(n,e){return n.node(e.w).rank-n.node(e.v).rank-n.edge(e).minlen}function Dn(n){var e,r,t=new c({directed:!1}),o=n.nodes()[0],i=n.nodeCount();for(t.setNode(o,{});$n(t,n)<i;)e=Jn(t,n),r=t.hasNode(e.v)?An(n,e):-An(n,e),Wn(t,n,r);return t}function $n(n,e){return f(n.nodes(),function r(t){f(e.nodeEdges(t),function(o){var i=o.v,u=t===i?o.w:i;n.hasNode(u)||An(e,o)||(n.setNode(u,{}),n.setEdge(t,u,{}),r(u))})}),n.nodeCount()}function Jn(n,e){return sn(e.edges(),function(r){if(n.hasNode(r.v)!==n.hasNode(r.w))return An(e,r)})}function Wn(n,e,r){f(n.nodes(),function(n){e.node(n).rank+=r})}function Hn(n,e,r){P(e)||(e=[e]);var t=(n.isDirected()?n.successors:n.neighbors).bind(n),o=[],i={};return f(e,function(e){if(!n.hasNode(e))throw new Error("Graph does not have node: "+e);Kn(n,e,"post"===r,i,t,o)}),o}function Kn(n,e,r,t,o,i){g(t,e)||(t[e]=!0,r||i.push(e),f(o(e),function(e){Kn(n,e,r,t,o,i)}),r&&i.push(e))}function Qn(n){n=function(n){var e=(new c).setGraph(n.graph());return f(n.nodes(),function(r){e.setNode(r,n.node(r))}),f(n.edges(),function(r){var t=e.edge(r.v,r.w)||{weight:0,minlen:1},o=n.edge(r);e.setEdge(r.v,r.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),e}(n),zn(n);var e,r=Dn(n);for(Zn(r),Un(r,n);e=ee(r);)te(r,n,e,re(r,n,e))}function Un(n,e){var r=function(n,e){return Hn(n,e,"post")}(n,n.nodes());r=r.slice(0,r.length-1),f(r,function(r){!function(n,e,r){var t=n.node(r).parent;n.edge(r,t).cutvalue=Xn(n,e,r)}(n,e,r)})}function Xn(n,e,r){var t=n.node(r).parent,o=!0,i=e.edge(r,t),u=0;return i||(o=!1,i=e.edge(t,r)),u=i.weight,f(e.nodeEdges(r),function(i){var a,d,c=i.v===r,f=c?i.w:i.v;if(f!==t){var s=c===o,g=e.edge(i).weight;if(u+=s?g:-g,a=r,d=f,n.hasEdge(a,d)){var h=n.edge(r,f).cutvalue;u+=s?-h:h}}}),u}function Zn(n,e){arguments.length<2&&(e=n.nodes()[0]),ne(n,{},1,e)}function ne(n,e,r,t,o){var i=r,u=n.node(t);return e[t]=!0,f(n.neighbors(t),function(o){g(e,o)||(r=ne(n,e,r,o,t))}),u.low=i,u.lim=r++,o?u.parent=o:delete u.parent,r}function ee(n){return en(n.edges(),function(e){return n.edge(e).cutvalue<0})}function re(n,e,r){var t=r.v,o=r.w;e.hasEdge(t,o)||(t=r.w,o=r.v);var i=n.node(t),u=n.node(o),a=i,d=!1;return i.lim>u.lim&&(a=u,d=!0),sn(p(e.edges(),function(e){return d===oe(n,n.node(e.v),a)&&d!==oe(n,n.node(e.w),a)}),function(n){return An(e,n)})}function te(n,e,r,t){var o=r.v,i=r.w;n.removeEdge(o,i),n.setEdge(t.v,t.w,{}),Zn(n),Un(n,e),function(n,e){var r=en(n.nodes(),function(n){return!e.node(n).parent}),t=function(n,e){return Hn(n,e,"pre")}(n,r);t=t.slice(1),f(t,function(r){var t=n.node(r).parent,o=e.edge(r,t),i=!1;o||(o=e.edge(t,r),i=!0),e.node(r).rank=e.node(t).rank+(i?o.minlen:-o.minlen)})}(n,e)}function oe(n,e,r){return r.low<=e.lim&&e.lim<=r.lim}function ie(n){switch(n.graph().ranker){case"network-simplex":default:!function(n){Qn(n)}(n);break;case"tight-tree":!function(n){zn(n),Dn(n)}(n);break;case"longest-path":ue(n)}}Qn.initLowLimValues=Zn,Qn.initCutValues=Un,Qn.calcCutValue=Xn,Qn.leaveEdge=ee,Qn.enterEdge=re,Qn.exchangeEdges=te;var ue=zn;function ae(n){var e=Tn(n,"root",{},"_root"),r=function(n){var e={};function r(t,o){var i=n.children(t);i&&i.length&&f(i,function(n){r(n,o+1)}),e[t]=o}return f(n.children(),function(n){r(n,1)}),e}(n),t=cn(v(r))-1,o=2*t+1;n.graph().nestingRoot=e,f(n.edges(),function(e){n.edge(e).minlen*=o});var i=function(n){return l(n.edges(),function(e,r){return e+n.edge(r).weight},0)}(n)+1;f(n.children(),function(u){de(n,e,o,i,t,r,u)}),n.graph().nodeRankFactor=o}function de(n,e,r,t,o,i,u){var a=n.children(u);if(a.length){var d=Pn(n,"_bt"),c=Pn(n,"_bb"),s=n.node(u);n.setParent(d,u),s.borderTop=d,n.setParent(c,u),s.borderBottom=c,f(a,function(a){de(n,e,r,t,o,i,a);var f=n.node(a),s=f.borderTop?f.borderTop:a,g=f.borderBottom?f.borderBottom:a,h=f.borderTop?t:2*t,v=s!==g?1:o-i[u]+1;n.setEdge(d,s,{weight:h,minlen:v,nestingEdge:!0}),n.setEdge(g,c,{weight:h,minlen:v,nestingEdge:!0})}),n.parent(u)||n.setEdge(e,d,{weight:0,minlen:o+i[u]})}else u!==e&&n.setEdge(e,u,{weight:0,minlen:r})}function ce(n,e){for(var r=0,t=1;t<e.length;++t)r+=fe(n,e[t-1],e[t]);return r}function fe(n,e,r){for(var t=function(n,e){return function(n,e,r){for(var t=-1,o=n.length,i=e.length,u={};++t<o;){var a=t<i?e[t]:void 0;r(u,n[t],a)}return u}(n||[],e||[],O)}(r,tn(r,function(n,e){return e})),o=H(tn(e,function(e){return bn(tn(n.outEdges(e),function(e){return{pos:t[e.w],weight:n.edge(e).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var u=2*i-1;i-=1;var a=tn(new Array(u),function(){return 0}),d=0;return f(o.forEach(function(n){var e=n.pos+i;a[e]+=n.weight;for(var r=0;e>0;)e%2&&(r+=a[e+1]),a[e=e-1>>1]+=n.weight;d+=n.weight*r})),d}function se(n,e){var r,t=function(n){var e={lhs:[],rhs:[]};return f(n,function(n){!function(n){return g(n,"barycenter")}(n)?e.rhs.push(n):e.lhs.push(n)}),e}(n),o=t.lhs,i=bn(t.rhs,function(n){return-n.i}),u=[],a=0,d=0,c=0;o.sort((r=!!e,function(n,e){return n.barycenter<e.barycenter?-1:n.barycenter>e.barycenter?1:r?e.i-n.i:n.i-e.i})),c=ge(u,i,c),f(o,function(n){c+=n.vs.length,u.push(n.vs),a+=n.barycenter*n.weight,d+=n.weight,c=ge(u,i,c)});var s={vs:H(u)};return d&&(s.barycenter=a/d,s.weight=d),s}function ge(n,e,r){for(var t;e.length&&(t=X(e)).i<=r;)e.pop(),n.push(t.vs),r++;return r}function he(n,e,r,t){var o=n.children(e),i=n.node(e),u=i?i.borderLeft:void 0,a=i?i.borderRight:void 0,d={};u&&(o=p(o,function(n){return n!==u&&n!==a}));var c=function(n,e){return tn(e,function(e){var r=n.inEdges(e);if(r.length){var t=l(r,function(e,r){var t=n.edge(r),o=n.node(r.v);return{sum:e.sum+t.weight*o.order,weight:e.weight+t.weight}},{sum:0,weight:0});return{v:e,barycenter:t.sum/t.weight,weight:t.weight}}return{v:e}})}(n,o);f(c,function(e){if(n.children(e.v).length){var o=he(n,e.v,r,t);d[e.v]=o,g(o,"barycenter")&&(u=o,s((i=e).barycenter)?(i.barycenter=u.barycenter,i.weight=u.weight):(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight))}var i,u});var h=function(n,e){var r={};return f(n,function(n,e){var t=r[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:e};s(n.barycenter)||(t.barycenter=n.barycenter,t.weight=n.weight)}),f(e.edges(),function(n){var e=r[n.v],t=r[n.w];s(e)||s(t)||(t.indegree++,e.out.push(r[n.w]))}),function(n){var e=[];function r(n){return function(e){e.merged||(s(e.barycenter)||s(n.barycenter)||e.barycenter>=n.barycenter)&&function(n,e){var r=0,t=0;n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.vs=e.vs.concat(n.vs),n.barycenter=r/t,n.weight=t,n.i=Math.min(e.i,n.i),e.merged=!0}(n,e)}}function t(e){return function(r){r.in.push(e),0==--r.indegree&&n.push(r)}}for(;n.length;){var o=n.pop();e.push(o),f(o.in.reverse(),r(o)),f(o.out,t(o))}return tn(p(e,function(n){return!n.merged}),function(n){return ln(n,["vs","i","barycenter","weight"])})}(p(r,function(n){return!n.indegree}))}(c,r);!function(n,e){f(n,function(n){n.vs=H(n.vs.map(function(n){return e[n]?e[n].vs:n}))})}(h,d);var v=se(h,t);if(u&&(v.vs=H([u,v.vs,a]),n.predecessors(u).length)){var w=n.node(n.predecessors(u)[0]),m=n.node(n.predecessors(a)[0]);g(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+w.order+m.order)/(v.weight+2),v.weight+=2}return v}function ve(n,e,r){return tn(e,function(e){return function(n,e,r){var t=function(n){for(var e;n.hasNode(e=xn("_root")););return e}(n),o=new c({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(e){return n.node(e)});return f(n.nodes(),function(i){var u=n.node(i),a=n.parent(i);(u.rank===e||u.minRank<=e&&e<=u.maxRank)&&(o.setNode(i),o.setParent(i,a||t),f(n[r](i),function(e){var r=e.v===i?e.w:e.v,t=o.edge(r,i),u=s(t)?0:t.weight;o.setEdge(r,i,{weight:n.edge(e).weight+u})}),g(u,"minRank")&&o.setNode(i,{borderLeft:u.borderLeft[e],borderRight:u.borderRight[e]}))}),o}(n,e,r)})}function le(n,e){var r=new c;f(n,function(n){var t=n.graph().root,o=he(n,t,r,e);f(o.vs,function(e,r){n.node(e).order=r}),function(n,e,r){var t,o={};f(r,function(r){for(var i,u,a=n.parent(r);a;){if((i=n.parent(a))?(u=o[i],o[i]=a):(u=t,t=a),u&&u!==a)return void e.setEdge(u,a);a=i}})}(n,r,o.vs)})}function pe(n,e){f(e,function(e){f(e,function(e,r){n.node(e).order=r})})}function we(n,e,r){if(e>r){var t=e;e=r,r=t}var o=n[e];o||(n[e]=o={}),o[r]=!0}function me(n,e,r){if(e>r){var t=e;e=r,r=t}return g(n[e],r)}function be(n){var e,r=On(n),t=j(function(n,e){var r={};return l(e,function(e,t){var o=0,i=0,u=e.length,a=X(t);return f(t,function(e,d){var c=function(n,e){if(n.node(e).dummy)return en(n.predecessors(e),function(e){return n.node(e).dummy})}(n,e),s=c?n.node(c).order:u;(c||e===a)&&(f(t.slice(i,d+1),function(e){f(n.predecessors(e),function(t){var i=n.node(t),u=i.order;!(u<o||s<u)||i.dummy&&n.node(e).dummy||we(r,t,e)})}),i=d+1,o=s)}),t}),r}(n,r),function(n,e){var r={};function t(e,t,o,i,u){var a;f(mn(t,o),function(t){a=e[t],n.node(a).dummy&&f(n.predecessors(a),function(e){var t=n.node(e);t.dummy&&(t.order<i||t.order>u)&&we(r,e,a)})})}return l(e,function(e,r){var o,i=-1,u=0;return f(r,function(a,d){if("border"===n.node(a).dummy){var c=n.predecessors(a);c.length&&(o=n.node(c[0]).order,t(r,u,d,i,o),u=d,i=o)}t(r,u,r.length,o,e.length)}),r}),r}(n,r)),o={};f(["u","d"],function(i){e="u"===i?r:v(r).reverse(),f(["l","r"],function(r){"r"===r&&(e=tn(e,function(n){return v(n).reverse()}));var u=("u"===i?n.predecessors:n.successors).bind(n),a=function(n,e,r,t){var o={},i={},u={};return f(e,function(n){f(n,function(n,e){o[n]=n,i[n]=n,u[n]=e})}),f(e,function(n){var e=-1;f(n,function(n){var a=t(n);if(a.length){a=bn(a,function(n){return u[n]});for(var d=(a.length-1)/2,c=Math.floor(d),f=Math.ceil(d);c<=f;++c){var s=a[c];i[n]===n&&e<u[s]&&!me(r,n,s)&&(i[s]=n,i[n]=o[n]=o[s],e=u[s])}}})}),{root:o,align:i}}(0,e,t,u),d=function(n,e,r,t,o){var i={},u=function(n,e,r,t){var o=new c,i=n.graph(),u=function(n,e,r){return function(t,o,i){var u,a=t.node(o),d=t.node(i),c=0;if(c+=a.width/2,g(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2}if(u&&(c+=r?u:-u),u=0,c+=(a.dummy?e:n)/2,c+=(d.dummy?e:n)/2,c+=d.width/2,g(d,"labelpos"))switch(d.labelpos.toLowerCase()){case"l":u=d.width/2;break;case"r":u=-d.width/2}return u&&(c+=r?u:-u),u=0,c}}(i.nodesep,i.edgesep,t);return f(e,function(e){var t;f(e,function(e){var i=r[e];if(o.setNode(i),t){var a=r[t],d=o.edge(a,i);o.setEdge(a,i,Math.max(u(n,e,t),d||0))}t=e})}),o}(n,e,r,o),a=o?"borderLeft":"borderRight";function d(n,e){for(var r=u.nodes(),t=r.pop(),o={};t;)o[t]?n(t):(o[t]=!0,r.push(t),r=r.concat(e(t))),t=r.pop()}return d(function(n){i[n]=u.inEdges(n).reduce(function(n,e){return Math.max(n,i[e.v]+u.edge(e))},0)},u.predecessors.bind(u)),d(function(e){var r=u.outEdges(e).reduce(function(n,e){return Math.min(n,i[e.w]-u.edge(e))},Number.POSITIVE_INFINITY),t=n.node(e);r!==Number.POSITIVE_INFINITY&&t.borderType!==a&&(i[e]=Math.max(i[e],r))},u.successors.bind(u)),f(t,function(n){i[n]=i[r[n]]}),i}(n,e,a.root,a.align,"r"===r);"r"===r&&(d=an(d,function(n){return-n})),o[i+r]=d})});var i=function(n,e){return sn(v(e),function(e){var r,t,o=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return t=function(e,r){var t=function(n,e){return n.node(e).width}(n,r)/2;o=Math.max(e+t,o),i=Math.min(e-t,i)},null==(r=e)||B(r,b(t),N),o-i})}(n,o);return function(n,e){var r=v(e),t=fn(r),o=cn(r);f(["u","d"],function(r){f(["l","r"],function(i){var u,a=r+i,d=n[a];if(d!==e){var c=v(d);(u="l"===i?t-fn(c):o-cn(c))&&(n[a]=an(d,function(n){return n+u}))}})})}(o,i),function(n,e){return an(n.ul,function(r,t){if(e)return n[e.toLowerCase()][t];var o=bn(tn(n,t));return(o[1]+o[2])/2})}(o,n.graph().align)}function ye(n,e){var r=e&&e.debugTiming?jn:Vn;r("layout",function(){var e=r(" buildLayoutGraph",function(){return function(n){var e=new c({multigraph:!0,compound:!0}),r=Le(n.graph());return e.setGraph(j({},ke,Te(r,xe),ln(r,Ee))),f(n.nodes(),function(r){var t=Le(n.node(r));e.setNode(r,U(Te(t,Ne),_e)),e.setParent(r,n.parent(r))}),f(n.edges(),function(r){var t=Le(n.edge(r));e.setEdge(r,j({},Re,Te(t,Ie),ln(t,Me)))}),e}(n)});r(" runLayout",function(){!function(n,e){e(" makeSpaceForEdgeLabels",function(){!function(n){var e=n.graph();e.ranksep/=2,f(n.edges(),function(r){var t=n.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}(n)}),e(" removeSelfEdges",function(){!function(n){f(n.edges(),function(e){if(e.v===e.w){var r=n.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:n.edge(e)}),n.removeEdge(e)}})}(n)}),e(" acyclic",function(){Mn(n)}),e(" nestingGraph.run",function(){ae(n)}),e(" rank",function(){ie(Ln(n))}),e(" injectEdgeLabelProxies",function(){!function(n){f(n.edges(),function(e){var r=n.edge(e);if(r.width&&r.height){var t=n.node(e.v),o={rank:(n.node(e.w).rank-t.rank)/2+t.rank,e:e};Tn(n,"edge-proxy",o,"_ep")}})}(n)}),e(" removeEmptyRanks",function(){!function(n){var e=fn(tn(n.nodes(),function(e){return n.node(e).rank})),r=[];f(n.nodes(),function(t){var o=n.node(t).rank-e;r[o]||(r[o]=[]),r[o].push(t)});var t=0,o=n.graph().nodeRankFactor;f(r,function(e,r){s(e)&&r%o!=0?--t:t&&f(e,function(e){n.node(e).rank+=t})})}(n)}),e(" nestingGraph.cleanup",function(){!function(n){var e=n.graph();n.removeNode(e.nestingRoot),delete e.nestingRoot,f(n.edges(),function(e){n.edge(e).nestingEdge&&n.removeEdge(e)})}(n)}),e(" normalizeRanks",function(){!function(n){var e=fn(tn(n.nodes(),function(e){return n.node(e).rank}));f(n.nodes(),function(r){var t=n.node(r);g(t,"rank")&&(t.rank-=e)})}(n)}),e(" assignRankMinMax",function(){!function(n){var e=0;f(n.nodes(),function(r){var t=n.node(r);t.borderTop&&(t.minRank=n.node(t.borderTop).rank,t.maxRank=n.node(t.borderBottom).rank,e=cn(e,t.maxRank))}),n.graph().maxRank=e}(n)}),e(" removeEdgeLabelProxies",function(){!function(n){f(n.nodes(),function(e){var r=n.node(e);"edge-proxy"===r.dummy&&(n.edge(r.e).labelRank=r.rank,n.removeNode(e))})}(n)}),e(" normalize.run",function(){!function(n){n.graph().dummyChains=[],f(n.edges(),function(e){!function(n,e){var r,t,o,i=e.v,u=n.node(i).rank,a=e.w,d=n.node(a).rank,c=e.name,f=n.edge(e),s=f.labelRank;if(d!==u+1){for(n.removeEdge(e),o=0,++u;u<d;++o,++u)f.points=[],r=Tn(n,"edge",t={width:0,height:0,edgeLabel:f,edgeObj:e,rank:u},"_d"),u===s&&(t.width=f.width,t.height=f.height,t.dummy="edge-label",t.labelpos=f.labelpos),n.setEdge(i,r,{weight:f.weight},c),0===o&&n.graph().dummyChains.push(r),i=r;n.setEdge(i,a,{weight:f.weight},c)}}(n,e)})}(n)}),e(" parentDummyChains",function(){!function(n){var e=function(n){var e={},r=0;return f(n.children(),function t(o){var i=r;f(n.children(o),t),e[o]={low:i,lim:r++}}),e}(n);f(n.graph().dummyChains,function(r){for(var t=n.node(r),o=t.edgeObj,i=function(n,e,r,t){var o,i,u=[],a=[],d=Math.min(e[r].low,e[t].low),c=Math.max(e[r].lim,e[t].lim);o=r;do{o=n.parent(o),u.push(o)}while(o&&(e[o].low>d||c>e[o].lim));for(i=o,o=t;(o=n.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(n,e,o.v,o.w),u=i.path,a=i.lca,d=0,c=u[d],f=!0;r!==o.w;){if(t=n.node(r),f){for(;(c=u[d])!==a&&n.node(c).maxRank<t.rank;)d++;c===a&&(f=!1)}if(!f){for(;d<u.length-1&&n.node(c=u[d+1]).minRank<=t.rank;)d++;c=u[d]}n.setParent(r,c),r=n.successors(r)[0]}})}(n)}),e(" addBorderSegments",function(){!function(n){f(n.children(),function e(r){var t=n.children(r),o=n.node(r);if(t.length&&f(t,e),g(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,u=o.maxRank+1;i<u;++i)Fn(n,"borderLeft","_bl",r,o,i),Fn(n,"borderRight","_br",r,o,i)}})}(n)}),e(" order",function(){!function(n){var e=Sn(n),r=ve(n,mn(1,e+1),"inEdges"),t=ve(n,mn(e-1,-1,-1),"outEdges"),o=function(n){var e={},r=p(n.nodes(),function(e){return!n.children(e).length}),t=cn(tn(r,function(e){return n.node(e).rank})),o=tn(mn(t+1),function(){return[]}),i=bn(r,function(e){return n.node(e).rank});return f(i,function r(t){if(!g(e,t)){e[t]=!0;var i=n.node(t);o[i.rank].push(t),f(n.successors(t),r)}}),o}(n);pe(n,o);for(var i,u=Number.POSITIVE_INFINITY,a=0,d=0;d<4;++a,++d){le(a%2?r:t,a%4>=2);var c=ce(n,o=On(n));c<u&&(d=0,i=w(o,5),u=c)}pe(n,i)}(n)}),e(" insertSelfEdges",function(){!function(n){var e=On(n);f(e,function(e){var r=0;f(e,function(e,t){var o=n.node(e);o.order=t+r,f(o.selfEdges,function(e){Tn(n,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:t+ ++r,e:e.e,label:e.label},"_se")}),delete o.selfEdges})})}(n)}),e(" adjustCoordinateSystem",function(){!function(n){var e=n.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||Gn(n)}(n)}),e(" position",function(){!function(n){var e,r;(function(n){var e=On(n),r=n.graph().ranksep,t=0;f(e,function(e){var o=cn(tn(e,function(e){return n.node(e).height}));f(e,function(e){n.node(e).y=t+o/2}),t+=o+r})})(n=Ln(n)),r=function(e,r){n.node(r).x=e},(e=be(n))&&h(e,b(r))}(n)}),e(" positionSelfEdges",function(){!function(n){f(n.nodes(),function(e){var r=n.node(e);if("selfedge"===r.dummy){var t=n.node(r.e.v),o=t.x+t.width/2,i=t.y,u=r.x-o,a=t.height/2;n.setEdge(r.e,r.label),n.removeNode(e),r.label.points=[{x:o+2*u/3,y:i-a},{x:o+5*u/6,y:i-a},{x:o+u,y:i},{x:o+5*u/6,y:i+a},{x:o+2*u/3,y:i+a}],r.label.x=r.x,r.label.y=r.y}})}(n)}),e(" removeBorderNodes",function(){!function(n){f(n.nodes(),function(e){if(n.children(e).length){var r=n.node(e),t=n.node(r.borderTop),o=n.node(r.borderBottom),i=n.node(X(r.borderLeft)),u=n.node(X(r.borderRight));r.width=Math.abs(u.x-i.x),r.height=Math.abs(o.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),f(n.nodes(),function(e){"border"===n.node(e).dummy&&n.removeNode(e)})}(n)}),e(" normalize.undo",function(){!function(n){f(n.graph().dummyChains,function(e){var r,t=n.node(e),o=t.edgeLabel;for(n.setEdge(t.edgeObj,o);t.dummy;)r=n.successors(e)[0],n.removeNode(e),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),e=r,t=n.node(e)})}(n)}),e(" fixupEdgeLabelCoords",function(){!function(n){f(n.edges(),function(e){var r=n.edge(e);if(g(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}(n)}),e(" undoCoordinateSystem",function(){!function(n){var e=n.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(n){f(n.nodes(),function(e){qn(n.node(e))}),f(n.edges(),function(e){var r=n.edge(e);f(r.points,qn),g(r,"y")&&qn(r)})}(n),"lr"!==e&&"rl"!==e||(function(n){f(n.nodes(),function(e){Yn(n.node(e))}),f(n.edges(),function(e){var r=n.edge(e);f(r.points,Yn),g(r,"x")&&Yn(r)})}(n),Gn(n))}(n)}),e(" translateGraph",function(){!function(n){var e=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,o=0,i=n.graph(),u=i.marginx||0,a=i.marginy||0;function d(n){var i=n.x,u=n.y,a=n.width,d=n.height;e=Math.min(e,i-a/2),r=Math.max(r,i+a/2),t=Math.min(t,u-d/2),o=Math.max(o,u+d/2)}f(n.nodes(),function(e){d(n.node(e))}),f(n.edges(),function(e){var r=n.edge(e);g(r,"x")&&d(r)}),e-=u,t-=a,f(n.nodes(),function(r){var o=n.node(r);o.x-=e,o.y-=t}),f(n.edges(),function(r){var o=n.edge(r);f(o.points,function(n){n.x-=e,n.y-=t}),g(o,"x")&&(o.x-=e),g(o,"y")&&(o.y-=t)}),i.width=r-e+u,i.height=o-t+a}(n)}),e(" assignNodeIntersects",function(){!function(n){f(n.edges(),function(e){var r,t,o=n.edge(e),i=n.node(e.v),u=n.node(e.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=u,t=i),o.points.unshift(Cn(i,r)),o.points.push(Cn(u,t))})}(n)}),e(" reversePoints",function(){!function(n){f(n.edges(),function(e){var r=n.edge(e);r.reversed&&r.points.reverse()})}(n)}),e(" acyclic.undo",function(){!function(n){f(n.edges(),function(e){var r=n.edge(e);if(r.reversed){n.removeEdge(e);var t=r.forwardName;delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,t)}})}(n)})}(e,r)}),r(" updateInputGraph",function(){!function(n,e){f(n.nodes(),function(r){var t=n.node(r),o=e.node(r);t&&(t.x=o.x,t.y=o.y,e.children(r).length&&(t.width=o.width,t.height=o.height))}),f(n.edges(),function(r){var t=n.edge(r),o=e.edge(r);t.points=o.points,g(o,"x")&&(t.x=o.x,t.y=o.y)}),n.graph().width=e.graph().width,n.graph().height=e.graph().height}(n,e)})})}var xe=["nodesep","edgesep","ranksep","marginx","marginy"],ke={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ee=["acyclicer","ranker","rankdir","align"],Ne=["width","height"],_e={width:0,height:0},Ie=["minlen","weight","width","height","labeloffset"],Re={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Me=["labelpos"];function Te(n,e){return an(ln(n,e),Number)}function Le(n){var e={};return f(n,function(n,r){e[r.toLowerCase()]=n}),e}export{ye as V,tn as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a3 as n,a4 as t,a5 as r,a6 as e,a7 as i}from"./index-0c25c9f2.js";import{e as o}from"./init-7e0ff151-92a0ac09.js";function a(n,t){return null==n||null==t?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function u(n,t){return null==n||null==t?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function c(n){let t,r,e;function i(n,e,i=0,o=n.length){if(i<o){if(0!==t(e,e))return o;do{const t=i+o>>>1;r(n[t],e)<0?i=t+1:o=t}while(i<o)}return i}return 2!==n.length?(t=a,r=(t,r)=>a(n(t),r),e=(t,r)=>n(t)-r):(t=n===a||n===u?n:l,r=n,e=n),{left:i,center:function(n,t,r=0,o=n.length){const a=i(n,t,r,o-1);return a>r&&e(n[a-1],t)>-e(n[a],t)?a-1:a},right:function(n,e,i=0,o=n.length){if(i<o){if(0!==t(e,e))return o;do{const t=i+o>>>1;r(n[t],e)<=0?i=t+1:o=t}while(i<o)}return i}}}function l(){return 0}const f=c(a).right;c(function(n){return null===n?NaN:+n}).center;var s=f;const h=Math.sqrt(50),m=Math.sqrt(10),g=Math.sqrt(2);function p(n,t,r){const e=(t-n)/Math.max(0,r),i=Math.floor(Math.log10(e)),o=e/Math.pow(10,i),a=o>=h?10:o>=m?5:o>=g?2:1;let u,c,l;return i<0?(l=Math.pow(10,-i)/a,u=Math.round(n*l),c=Math.round(t*l),u/l<n&&++u,c/l>t&&--c,l=-l):(l=Math.pow(10,i)*a,u=Math.round(n/l),c=Math.round(t/l),u*l<n&&++u,c*l>t&&--c),c<u&&.5<=r&&r<2?p(n,t,2*r):[u,c,l]}function v(n,t,r){return p(n=+n,t=+t,r=+r)[2]}function M(n,t,r){r=+r;const e=(t=+t)<(n=+n),i=e?v(t,n,r):v(n,t,r);return(e?-1:1)*(i<0?1/-i:i)}function d(n,t){t||(t=[]);var r,e=n?Math.min(t.length,n.length):0,i=t.slice();return function(o){for(r=0;r<e;++r)i[r]=n[r]*(1-o)+t[r]*o;return i}}function y(n,t){var r,e=t?t.length:0,i=n?Math.min(e,n.length):0,o=new Array(i),a=new Array(e);for(r=0;r<i;++r)o[r]=N(n[r],t[r]);for(;r<e;++r)a[r]=t[r];return function(n){for(r=0;r<i;++r)a[r]=o[r](n);return a}}function w(n,t){var r=new Date;return n=+n,t=+t,function(e){return r.setTime(n*(1-e)+t*e),r}}function b(n,t){var r,e={},i={};for(r in null!==n&&"object"==typeof n||(n={}),null!==t&&"object"==typeof t||(t={}),t)r in n?e[r]=N(n[r],t[r]):i[r]=t[r];return function(n){for(r in e)i[r]=e[r](n);return i}}function N(o,a){var u,c,l=typeof a;return null==a||"boolean"===l?t(a):("number"===l?n:"string"===l?(u=r(a))?(a=u,e):i:a instanceof r?e:a instanceof Date?w:(c=a,!ArrayBuffer.isView(c)||c instanceof DataView?Array.isArray(a)?y:"function"!=typeof a.valueOf&&"function"!=typeof a.toString||isNaN(a)?b:n:d))(o,a)}function x(n,t){return n=+n,t=+t,function(r){return Math.round(n*(1-r)+t*r)}}function A(n,t){if((r=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var r,e=n.slice(0,r);return[e.length>1?e[0]+e.slice(2):e,+n.slice(r+1)]}function k(n){return(n=A(Math.abs(n)))?n[1]:NaN}var j,S=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function z(n){if(!(t=S.exec(n)))throw new Error("invalid format: "+n);var t;return new E({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function E(n){this.fill=void 0===n.fill?" ":n.fill+"",this.align=void 0===n.align?">":n.align+"",this.sign=void 0===n.sign?"-":n.sign+"",this.symbol=void 0===n.symbol?"":n.symbol+"",this.zero=!!n.zero,this.width=void 0===n.width?void 0:+n.width,this.comma=!!n.comma,this.precision=void 0===n.precision?void 0:+n.precision,this.trim=!!n.trim,this.type=void 0===n.type?"":n.type+""}function $(n,t){var r=A(n,t);if(!r)return n+"";var e=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+e:e.length>i+1?e.slice(0,i+1)+"."+e.slice(i+1):e+new Array(i-e.length+2).join("0")}z.prototype=E.prototype,E.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var P={"%":(n,t)=>(100*n).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:function(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)},e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>$(100*n,t),r:$,s:function(n,t){var r=A(n,t);if(!r)return n+"";var e=r[0],i=r[1],o=i-(j=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=e.length;return o===a?e:o>a?e+new Array(o-a+1).join("0"):o>0?e.slice(0,o)+"."+e.slice(o):"0."+new Array(1-o).join("0")+A(n,Math.max(0,t+o-1))[0]},X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function q(n){return n}var C,D,F,L=Array.prototype.map,O=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function T(n){return+n}C=function(n){var t,r,e=void 0===n.grouping||void 0===n.thousands?q:(t=L.call(n.grouping,Number),r=n.thousands+"",function(n,e){for(var i=n.length,o=[],a=0,u=t[0],c=0;i>0&&u>0&&(c+u+1>e&&(u=Math.max(1,e-c)),o.push(n.substring(i-=u,i+u)),!((c+=u+1)>e));)u=t[a=(a+1)%t.length];return o.reverse().join(r)}),i=void 0===n.currency?"":n.currency[0]+"",o=void 0===n.currency?"":n.currency[1]+"",a=void 0===n.decimal?".":n.decimal+"",u=void 0===n.numerals?q:function(n){return function(t){return t.replace(/[0-9]/g,function(t){return n[+t]})}}(L.call(n.numerals,String)),c=void 0===n.percent?"%":n.percent+"",l=void 0===n.minus?"−":n.minus+"",f=void 0===n.nan?"NaN":n.nan+"";function s(n){var t=(n=z(n)).fill,r=n.align,s=n.sign,h=n.symbol,m=n.zero,g=n.width,p=n.comma,v=n.precision,M=n.trim,d=n.type;"n"===d?(p=!0,d="g"):P[d]||(void 0===v&&(v=12),M=!0,d="g"),(m||"0"===t&&"="===r)&&(m=!0,t="0",r="=");var y="$"===h?i:"#"===h&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",w="$"===h?o:/[%p]/.test(d)?c:"",b=P[d],N=/[defgprs%]/.test(d);function x(n){var i,o,c,h=y,x=w;if("c"===d)x=b(n)+x,n="";else{var A=(n=+n)<0||1/n<0;if(n=isNaN(n)?f:b(Math.abs(n),v),M&&(n=function(n){n:for(var t,r=n.length,e=1,i=-1;e<r;++e)switch(n[e]){case".":i=t=e;break;case"0":0===i&&(i=e),t=e;break;default:if(!+n[e])break n;i>0&&(i=0)}return i>0?n.slice(0,i)+n.slice(t+1):n}(n)),A&&0==+n&&"+"!==s&&(A=!1),h=(A?"("===s?s:l:"-"===s||"("===s?"":s)+h,x=("s"===d?O[8+j/3]:"")+x+(A&&"("===s?")":""),N)for(i=-1,o=n.length;++i<o;)if(48>(c=n.charCodeAt(i))||c>57){x=(46===c?a+n.slice(i+1):n.slice(i))+x,n=n.slice(0,i);break}}p&&!m&&(n=e(n,1/0));var k=h.length+n.length+x.length,S=k<g?new Array(g-k+1).join(t):"";switch(p&&m&&(n=e(S+n,S.length?g-x.length:1/0),S=""),r){case"<":n=h+n+x+S;break;case"=":n=h+S+n+x;break;case"^":n=S.slice(0,k=S.length>>1)+h+n+x+S.slice(k);break;default:n=S+h+n+x}return u(n)}return v=void 0===v?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),x.toString=function(){return n+""},x}return{format:s,formatPrefix:function(n,t){var r=s(((n=z(n)).type="f",n)),e=3*Math.max(-8,Math.min(8,Math.floor(k(t)/3))),i=Math.pow(10,-e),o=O[8+e/3];return function(n){return r(i*n)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),D=C.format,F=C.formatPrefix;var V=[0,1];function X(n){return n}function B(n,t){return(t-=n=+n)?function(r){return(r-n)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function G(n,t,r){var e=n[0],i=n[1],o=t[0],a=t[1];return i<e?(e=B(i,e),o=r(a,o)):(e=B(e,i),o=r(o,a)),function(n){return o(e(n))}}function I(n,t,r){var e=Math.min(n.length,t.length)-1,i=new Array(e),o=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++a<e;)i[a]=B(n[a],n[a+1]),o[a]=r(t[a],t[a+1]);return function(t){var r=s(n,t,1,e)-1;return o[r](i[r](t))}}function R(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function U(){return function(){var t,r,e,i,o,a,u=V,c=V,l=N,f=X;function s(){var n,t,r,e=Math.min(u.length,c.length);return f!==X&&(n=u[0],t=u[e-1],n>t&&(r=n,n=t,t=r),f=function(r){return Math.max(n,Math.min(t,r))}),i=e>2?I:G,o=a=null,h}function h(n){return null==n||isNaN(n=+n)?e:(o||(o=i(u.map(t),c,l)))(t(f(n)))}return h.invert=function(e){return f(r((a||(a=i(c,u.map(t),n)))(e)))},h.domain=function(n){return arguments.length?(u=Array.from(n,T),s()):u.slice()},h.range=function(n){return arguments.length?(c=Array.from(n),s()):c.slice()},h.rangeRound=function(n){return c=Array.from(n),l=x,s()},h.clamp=function(n){return arguments.length?(f=!!n||X,s()):f!==X},h.interpolate=function(n){return arguments.length?(l=n,s()):l},h.unknown=function(n){return arguments.length?(e=n,h):e},function(n,e){return t=n,r=e,s()}}()(X,X)}function Y(n){var t=n.domain;return n.ticks=function(n){var r=t();return function(n,t,r){if(!((r=+r)>0))return[];if((n=+n)==(t=+t))return[n];const e=t<n,[i,o,a]=e?p(t,n,r):p(n,t,r);if(!(o>=i))return[];const u=o-i+1,c=new Array(u);if(e)if(a<0)for(let n=0;n<u;++n)c[n]=(o-n)/-a;else for(let n=0;n<u;++n)c[n]=(o-n)*a;else if(a<0)for(let n=0;n<u;++n)c[n]=(i+n)/-a;else for(let n=0;n<u;++n)c[n]=(i+n)*a;return c}(r[0],r[r.length-1],null==n?10:n)},n.tickFormat=function(n,r){var e=t();return function(n,t,r,e){var i,o=M(n,t,r);switch((e=z(null==e?",f":e)).type){case"s":var a=Math.max(Math.abs(n),Math.abs(t));return null!=e.precision||isNaN(i=function(n,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(k(t)/3)))-k(Math.abs(n)))}(o,a))||(e.precision=i),F(e,a);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(i=function(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,k(t)-k(n))+1}(o,Math.max(Math.abs(n),Math.abs(t))))||(e.precision=i-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(i=function(n){return Math.max(0,-k(Math.abs(n)))}(o))||(e.precision=i-2*("%"===e.type))}return D(e)}(e[0],e[e.length-1],null==n?10:n,r)},n.nice=function(r){null==r&&(r=10);var e,i,o=t(),a=0,u=o.length-1,c=o[a],l=o[u],f=10;for(l<c&&(i=c,c=l,l=i,i=a,a=u,u=i);f-- >0;){if((i=v(c,l,r))===e)return o[a]=c,o[u]=l,t(o);if(i>0)c=Math.floor(c/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,l=Math.floor(l*i)/i}e=i}return n},n}function Z(){var n=U();return n.copy=function(){return R(n,Z())},o.apply(n,arguments),Y(n)}export{Z as J,M,R as Q,U as Z,c};
|