From f015500e86e33fdcfa2b0640043ff987adbe099c Mon Sep 17 00:00:00 2001 From: eensander Date: Tue, 21 Jun 2022 23:32:01 +0200 Subject: [PATCH 1/7] prod branch, including /dist folder --- .gitignore | 1 - dist/css/app.867ccc0c.css | 4 ++++ dist/favicon.ico | Bin 0 -> 4286 bytes dist/index.html | 1 + dist/js/app.34964d99.js | 2 ++ dist/js/app.34964d99.js.map | 1 + dist/js/chunk-vendors.fc237368.js | 33 ++++++++++++++++++++++++++ dist/js/chunk-vendors.fc237368.js.map | 1 + 8 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 dist/css/app.867ccc0c.css create mode 100644 dist/favicon.ico create mode 100644 dist/index.html create mode 100644 dist/js/app.34964d99.js create mode 100644 dist/js/app.34964d99.js.map create mode 100644 dist/js/chunk-vendors.fc237368.js create mode 100644 dist/js/chunk-vendors.fc237368.js.map diff --git a/.gitignore b/.gitignore index 403adbc..4a2e501 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ .DS_Store node_modules -/dist # local env files diff --git a/dist/css/app.867ccc0c.css b/dist/css/app.867ccc0c.css new file mode 100644 index 0000000..4a7a615 --- /dev/null +++ b/dist/css/app.867ccc0c.css @@ -0,0 +1,4 @@ +input{border-color:rgb(229 231 235/var(--tw-border-opacity))}button.action-btn-remove,input{border-width:1px;--tw-border-opacity:1}button.action-btn-remove{border-color:rgb(254 202 202/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity));font-weight:400}button.action-btn-remove:hover{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}button.action-btn-remove{border-radius:.25rem;padding-left:.75rem;padding-right:.75rem;padding-top:.125rem;padding-bottom:.125rem;--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}button.action-btn-remove:hover{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity))}.shape-holder{-webkit-user-select:none;-moz-user-select:none;user-select:none;margin-top:2rem}.shape-holder .shape{margin-bottom:.25rem;border-bottom-width:2px;border-top-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity));padding:.5rem}.shape-holder .node{margin-bottom:.5rem;cursor:move;--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity));width:auto;padding:.375rem .5rem;border-radius:0;border-left:0;border-right:0}.shape-holder .node:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.toolbar{display:flex;padding:.5rem}.toolbar .toolbar-item button{margin-right:.5rem;display:flex;align-items:center;border-radius:.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding-left:.75rem;padding-right:.75rem;padding-top:.25rem;padding-bottom:.25rem;font-weight:400;--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.toolbar .toolbar-item button[disabled]{cursor:not-allowed;--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.toolbar .toolbar-item button i{margin-right:.5rem;font-size:1.125rem;line-height:1.75rem;line-height:1}.toolbar .toolbar-item button:hover{cursor:pointer;--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity))}.validation-error span.clickable-entity{font-size:.7rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875rem;line-height:1.25rem;color:#3f1313;cursor:pointer;text-decoration:underline;text-underline-offset:4px}.validation-error span.clickable-entity:hover{text-decoration:initial}.copy-button{position:absolute;top:0;right:0;margin:.5rem;border-radius:.25rem;border-width:1px;--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity));padding-left:.5rem;padding-right:.5rem;padding-top:.125rem;padding-bottom:.125rem;font-size:.875rem;line-height:1.25rem;font-weight:700;text-transform:uppercase;--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.copy-button:hover{cursor:pointer;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity));--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity))}#app{margin:1rem;margin-top:30px} +/* +! tailwindcss v3.0.24 | MIT License | https://tailwindcss.com +*/*,:after,:before{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af}input::placeholder,textarea::placeholder{color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding-top:.5rem;padding-right:.75rem;padding-bottom:.5rem;padding-left:.75rem;font-size:1rem;line-height:1.5rem;--tw-shadow:0 0 #0000}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,select:focus,textarea:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;color-adjust:exact}[multiple]{background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow:0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto -webkit-focus-ring-color}*,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.top-0{top:0}.right-0{right:0}.m-2{margin:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mb-8{margin-bottom:2rem}.mt-4{margin-top:1rem}.mb-4{margin-bottom:1rem}.ml-4{margin-left:1rem}.mt-2{margin-top:.5rem}.mb-1{margin-bottom:.25rem}.mr-1{margin-right:.25rem}.mt-1{margin-top:.25rem}.mr-2{margin-right:.5rem}.mb-2{margin-bottom:.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.h-full{height:100%}.w-full{width:100%}.w-20{width:5rem}.w-64{width:16rem}.max-w-6xl{max-width:72rem}.flex-initial{flex:0 1 auto}.flex-grow{flex-grow:1}.cursor-pointer{cursor:pointer}.cursor-move{cursor:move}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.items-center{align-items:center}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-4{border-width:4px}.border-t{border-top-width:1px}.border-b-0{border-bottom-width:0}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.p-2{padding:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-0{padding-top:0;padding-bottom:0}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pl-6{padding-left:1.5rem}.text-right{text-align:right}.font-serif{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.font-normal{font-weight:400}.font-bold{font-weight:700}.font-medium{font-weight:500}.uppercase{text-transform:uppercase}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.underline{-webkit-text-decoration-line:underline;text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-2,.ring-4{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-4{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-gray-200{--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}html{overflow-y:scroll}.node{display:block;display:flex;height:100%;width:100%;align-items:center;padding-left:.75rem;font-size:.875rem;line-height:1.25rem;border-radius:.25rem;border:1px solid #b1b1b1;background-color:#fff}.node span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.node.node-start{border-bottom:4px solid #03b54d}.node.node-decision{border-bottom:4px solid #6a7fdb}.node.node-notice{border-bottom:4px solid #9a969c}.node.node-end{border-bottom:4px solid #df5361}.node.node-has-errors:after{content:"";position:absolute;height:100%;width:20px;top:0;right:0;background-image:radial-gradient(circle at center,#fecaca 4px,transparent 5px);background-size:20px 20px;background-position:top,bottom;background-repeat:no-repeat}.node span.node-label-variable{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.85rem}.node span.node-label-content{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif}.node span.node-label-unnamed{font-style:italic;color:#6c6c6c}.x6-cell.x6-node.x6-node-selected .node-start{border-color:#03b54d;box-shadow:0 0 0 4px rgba(3,181,77,.2)}.x6-cell.x6-node.x6-node-selected .node-decision{border-color:#6a7fdb;box-shadow:0 0 0 4px rgba(106,127,219,.2)}.x6-cell.x6-node.x6-node-selected .node-notice{border-color:#9a969c;box-shadow:0 0 0 4px hsla(280,3%,60%,.25)}.x6-cell.x6-node.x6-node-selected .node-end{border-color:#df5361;box-shadow:0 0 0 4px rgba(223,83,97,.2)}.x6-cell.x6-edge.x6-edge-selected path{stroke:#1890ff;stroke-width:1.5px!important}button.btn{border-radius:.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity));--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));padding-left:.75rem;padding-right:.75rem;padding-top:.25rem;padding-bottom:.25rem;font-weight:400;--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}button.btn[disabled]{cursor:not-allowed;--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}button.btn i{margin-right:.5rem;font-size:1.125rem;line-height:1.75rem;line-height:1}button.btn:hover{cursor:pointer;--tw-border-opacity:1;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);--tw-ring-opacity:1;--tw-ring-color:rgb(229 231 235/var(--tw-ring-opacity))}.hover\:border-gray-400:hover,button.btn:hover{border-color:rgb(156 163 175/var(--tw-border-opacity))}.hover\:border-gray-400:hover{--tw-border-opacity:1}.hover\:border-red-400:hover{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.hover\:no-underline:hover{-webkit-text-decoration-line:none;text-decoration-line:none} \ No newline at end of file diff --git a/dist/favicon.ico b/dist/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..df36fcfb72584e00488330b560ebcf34a41c64c2 GIT binary patch literal 4286 zcmds*O-Phc6o&64GDVCEQHxsW(p4>LW*W<827=Unuo8sGpRux(DN@jWP-e29Wl%wj zY84_aq9}^Am9-cWTD5GGEo#+5Fi2wX_P*bo+xO!)p*7B;iKlbFd(U~_d(U?#hLj56 zPhFkj-|A6~Qk#@g^#D^U0XT1cu=c-vu1+SElX9NR;kzAUV(q0|dl0|%h|dI$%VICy zJnu2^L*Te9JrJMGh%-P79CL0}dq92RGU6gI{v2~|)p}sG5x0U*z<8U;Ij*hB9z?ei z@g6Xq-pDoPl=MANPiR7%172VA%r)kevtV-_5H*QJKFmd;8yA$98zCxBZYXTNZ#QFk2(TX0;Y2dt&WitL#$96|gJY=3xX zpCoi|YNzgO3R`f@IiEeSmKrPSf#h#Qd<$%Ej^RIeeYfsxhPMOG`S`Pz8q``=511zm zAm)MX5AV^5xIWPyEu7u>qYs?pn$I4nL9J!=K=SGlKLXpE<5x+2cDTXq?brj?n6sp= zphe9;_JHf40^9~}9i08r{XM$7HB!`{Ys~TK0kx<}ZQng`UPvH*11|q7&l9?@FQz;8 zx!=3<4seY*%=OlbCbcae?5^V_}*K>Uo6ZWV8mTyE^B=DKy7-sdLYkR5Z?paTgK-zyIkKjIcpyO z{+uIt&YSa_$QnN_@t~L014dyK(fOOo+W*MIxbA6Ndgr=Y!f#Tokqv}n<7-9qfHkc3 z=>a|HWqcX8fzQCT=dqVbogRq!-S>H%yA{1w#2Pn;=e>JiEj7Hl;zdt-2f+j2%DeVD zsW0Ab)ZK@0cIW%W7z}H{&~yGhn~D;aiP4=;m-HCo`BEI+Kd6 z={Xwx{TKxD#iCLfl2vQGDitKtN>z|-AdCN|$jTFDg0m3O`WLD4_s#$S literal 0 HcmV?d00001 diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000..d5abca2 --- /dev/null +++ b/dist/index.html @@ -0,0 +1 @@ +GraphDoc
\ No newline at end of file diff --git a/dist/js/app.34964d99.js b/dist/js/app.34964d99.js new file mode 100644 index 0000000..8d31045 --- /dev/null +++ b/dist/js/app.34964d99.js @@ -0,0 +1,2 @@ +(function(){"use strict";var e={977:function(e,t,n){var o=n(963),a=n(252),s=n(577),d=n(262),i=n(59),l=n(482),r=n(934);function c(){return(0,r.Z)()}const u={appearance:{x:0,y:0,width:100,height:100},gd:{type:"notice",content:null,variable:null}};class g{constructor(e){"undefined"==typeof e.id&&(e.id=c()),Object.assign(this,u,e)}is_node(){return!0}is_edge(){return!1}get_label(){return this.gd.variable??this.gd.content??this.id.substring(0,8)}get_content(){return this.gd.content??`[content of node ${this.id.substring(0,8)}]`}get_edges_in(){return this.graph.edges.filter((e=>e.node_to_id==this.id))}get_edges_out(){return this.graph.edges.filter((e=>e.node_from_id==this.id))}get_nodes_in(){const e=this.get_edges_in().map((e=>e.node_from_id))??[];return this.graph.nodes.filter((t=>e.includes(t.id)))}get_nodes_out(){const e=this.get_edges_out().map((e=>e.node_to_id))??[];return this.graph.nodes.filter((t=>e.includes(t.id)))}}const p={gd:{content:null}};class h{constructor(e){e.id=e.id??c(),Object.assign(this,p,e)}is_node(){return!1}is_edge(){return!0}get_node_from(){return this.graph.nodes.filter((e=>e.id==this.node_from_id))[0]}get_node_to(){return this.graph.nodes.filter((e=>e.id==this.node_to_id))[0]}}class _{constructor(e="Untitled graph"){(0,l.Z)(this,"name",void 0),(0,l.Z)(this,"nodes",[]),(0,l.Z)(this,"edges",[]),this.name=e}get_nodes_by_type(e){return this.nodes.filter((t=>t.gd.type==e))??[]}add_node(e){this.nodes.push(new g({...e,graph:this}))}add_edge(e){this.edges.push(new h({...e,graph:this}))}clear(){this.nodes=[],this.edges=[]}}var b=_;const f=(e="")=>null==e?null:{attrs:{text:{text:e}},position:{distance:.4}},v={attrs:{line:{strokeWidth:"1"}},zIndex:-1},m={grid:!0,background:{color:"white"},mousewheel:{enabled:!0,zoomAtMousePosition:!0,modifiers:"ctrl",minScale:.5,maxScale:3},scroller:{enabled:!0,pannable:!0},connecting:{allowBlank:!1,allowMulti:!1,allowLoop:!1,allowEdge:!1,allowNode:!1,allowPort:!0,highlight:!0,snap:!0,connector:"algo-connector",connectionPoint:"boundary",anchor:"top",validateMagnet({e:e,magnet:t,view:n,cell:o}){return"in"!==t.getAttribute("port-group")},createEdge(){return this.createEdge(v)},validateEdge({edge:e,type:t,previous:n}){return!0},validateConnection({edge:e,sourceMagnet:t,targetMagnet:n}){return null!=t&&null!=n&&("out"==t.getAttribute("port-group")&&"in"==n.getAttribute("port-group"))}},history:{enabled:!0,beforeAddCommand(e,t){if("tools"==t.key)return!1}},resizing:{enabled:!1},selecting:{enabled:!0,multiple:!1}};function y(e){e.on("node:mouseenter",(({cell:e})=>{e.addTools([{name:"button-remove"}])})),e.on("node:mouseleave",(({cell:e})=>{setTimeout((()=>{e.removeTool("button-remove")}),1e3)})),i.kJ.registerConnector("algo-connector",((e,t)=>{const n=4,o=Math.abs(t.y-e.y),a=Math.floor(o/3*2),s={x:e.x,y:e.y+n+a},d={x:t.x,y:t.y-n-a};return i.y$.normalize(`M ${e.x} ${e.y}\n L ${e.x} ${e.y+n}\n C ${s.x} ${s.y} ${d.x} ${d.y} ${t.x} ${t.y-n}\n L ${t.x} ${t.y}\n `)}),!0)}const w={in:{attrs:{circle:{r:6,stroke:"#6a6a6b",magnet:!0}},position:"top"},out:{attrs:{circle:{r:6,stroke:"#6a6a6b",magnet:!0}},position:"bottom"}};function k(e){const t={groups:w,items:[]};for(const n of e)t.items.push({id:`${n}-1`,group:n});return t}const x="notice",D={render(e){const t=e.getData();let n="",o="";return t.gd.variable?(n=t.gd.variable,o="node-label-variable"):t.gd.content?(n=`"${t.gd.content}"`,o="node-label-content"):(n=`unnamed ${t.gd.type} node`,o="node-label-unnamed"),`
\n ${n}\n
`},shouldComponentUpdate(e){return e.hasChanged("data")}},$={start:{antv_metadata:{shape:"html",html:D,width:180,height:36,data:{gd:Object.assign({},u.gd,{type:"start"})},ports:k(["out"])},config_fields:{general:["variable","label"],additional:[]}},decision:{antv_metadata:{shape:"html",html:D,width:180,height:36,data:{gd:Object.assign({},u.gd,{type:"decision"})},ports:k(["in","out"])},config_fields:{general:["variable","label"],additional:[]}},notice:{antv_metadata:{shape:"html",html:D,width:180,height:36,data:{gd:Object.assign({},u.gd,{type:"notice"})},ports:k(["in","out"])},config_fields:{general:["variable","label"],additional:[]}},end:{antv_metadata:{shape:"html",html:D,width:180,height:36,data:{gd:Object.assign({},u.gd,{type:"end"})},ports:k(["in"])},config_fields:{general:["variable","label"]}}};function C(e){return e[0].toUpperCase()+e.slice(1).toLowerCase()}const j={key:0},O=(0,a._)("span",{class:"block p-2 text-gray-700"},"Select a node or edge to configure",-1),S=[O],E={key:1,class:"w-full"},H={class:""},N={class:"m-2 font-bold block text-2xl border-b border-gray-300"},A={class:"p-2"},T={class:"p-2"},I={class:"my-2 block border-b border-gray-300 uppercase font-bold text-sm text-gray-800"},P={key:0},U=(0,a._)("span",{class:"text-gray-700 block mb-1"},"Variable",-1),q={key:1},z=(0,a._)("span",{class:"text-gray-700 block mb-1"},"Content",-1),Y={key:2,class:"w-full"},Z={class:""},L=(0,a._)("span",{class:"m-2 font-bold block text-2xl border-b border-gray-300"},"Edge",-1),M={class:"p-2"},F={key:0,class:"p-2"},J=(0,a._)("span",{class:"my-2 block border-b border-gray-300 uppercase font-bold text-sm text-gray-800"},"General",-1),R={class:"block mt-2"},V=(0,a._)("span",{class:"text-gray-700 block mb-1"},"Label",-1),G={class:"w-full my-2 text-right"},W={key:3},B=(0,a._)("span",null,"Invalid cell selected",-1),K=[B];var X=(0,a.aZ)({props:{cell:null},setup(e){const t=e,n=(0,a.Fl)((()=>{const e=t.cell?.getData()?.node_type??x;let n=null;return n=Object.keys($).includes(e)?$[e].config_fields:$[x].config_fields,Object.fromEntries(Object.entries(n).filter((([e,t])=>t.length>0)))})),i=(0,a.Fl)({get(){return t.cell.getData().gd.content??""},set(e){t.cell.setData({gd:{content:e}})}}),l=(0,a.Fl)({get(){return t.cell.getData().gd.variable??""},set(e){t.cell.setData({gd:{variable:""!=e?e:null}})}}),r=(0,d.iH)(""),c=(0,a.Fl)({get(){const e=t.cell;return r.value,e.getLabelAt(0)?.attrs?.text?.text?.toString()??""},set(e){const n=t.cell,o=f(e);null!=o&&(n.removeLabelAt(0),n.setLabelAt(0,o)),r.value=e,n.setData({value:e})}});return(t,r)=>null==e.cell?((0,a.wg)(),(0,a.iD)("div",j,S)):e.cell.isNode()?((0,a.wg)(),(0,a.iD)("div",E,[(0,a._)("div",H,[(0,a._)("span",N,(0,s.zw)((0,d.SU)(C)(e.cell.data.gd.type))+" node",1),(0,a._)("div",A,[(0,a._)("button",{onClick:r[0]||(r[0]=t=>e.cell?.remove()),class:"action-btn-remove"},"Remove")]),((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)((0,d.SU)(n),((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t},[(0,a._)("div",T,[(0,a._)("span",I,(0,s.zw)(t),1),((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e,(e=>((0,a.wg)(),(0,a.iD)("div",{key:e,class:"block mt-2 mb-1"},["variable"==e?((0,a.wg)(),(0,a.iD)("label",P,[U,(0,a._)("div",null,[(0,a.wy)((0,a._)("input",{class:"w-full",type:"text","onUpdate:modelValue":r[1]||(r[1]=e=>(0,d.dq)(l)?l.value=e:null)},null,512),[[o.nr,(0,d.SU)(l)]])])])):(0,a.kq)("",!0),"label"==e?((0,a.wg)(),(0,a.iD)("label",q,[z,(0,a._)("div",null,[(0,a.wy)((0,a._)("textarea",{style:{"min-height":"3rem"},class:"w-full",type:"text","onUpdate:modelValue":r[2]||(r[2]=e=>(0,d.dq)(i)?i.value=e:null)},null,512),[[o.nr,(0,d.SU)(i)]])])])):(0,a.kq)("",!0)])))),128))])])))),128))])])):e.cell.isEdge()?((0,a.wg)(),(0,a.iD)("div",Y,[(0,a._)("div",Z,[L,(0,a._)("div",M,[(0,a._)("button",{onClick:r[3]||(r[3]=t=>e.cell?.remove()),class:"action-btn-remove"},"Remove")]),"decision"==e.cell.getSourceCell()?.getData().gd.type?((0,a.wg)(),(0,a.iD)("div",F,[J,(0,a._)("div",R,[(0,a._)("label",null,[V,(0,a.wy)((0,a._)("input",{type:"text",class:"w-full","onUpdate:modelValue":r[4]||(r[4]=e=>(0,d.dq)(c)?c.value=e:null)},null,512),[[o.nr,(0,d.SU)(c)]])]),(0,a._)("div",G,[(0,a._)("button",{class:"inline btn mr-2",onClick:r[5]||(r[5]=e=>c.value="Yes")},"Yes"),(0,a._)("button",{class:"inline btn",onClick:r[6]||(r[6]=e=>c.value="No")},"No")])])])):(0,a.kq)("",!0)])])):((0,a.wg)(),(0,a.iD)("div",W,K))}});const Q=X;var ee=Q;const te={class:"shape-holder"},ne=["data-type"];var oe=(0,a.aZ)({props:{graph:null},setup(e){const t=e,n=(0,d.iH)();(0,a.bv)((()=>{})),(0,a.YP)((()=>t.graph),(e=>{"undefined"!==typeof e&&o(e)}));const o=e=>{n.value=new i.e9.Dnd({target:e,scaled:!1,animation:!0,validateNode(e,t){return!0}})},l=e=>{if("undefined"==typeof t.graph)return!1;const o=e.currentTarget,a=o.getAttribute("data-type");if(!(a in $))return!1;const s=t.graph.createNode($[a].antv_metadata);s.setData({label:a}),n.value?.start(s,e)};return(e,t)=>((0,a.wg)(),(0,a.iD)("div",te,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)((0,d.SU)($),((e,n)=>((0,a.wg)(),(0,a.iD)("div",{key:n,class:(0,s.C_)(`node node-${n}`),"data-type":n,onMousedown:t[0]||(t[0]=e=>l(e))},(0,s.zw)(n),43,ne)))),128))]))}});const ae=oe;var se=ae;function de(e,t=1,n=2){return e.map((e=>" ".repeat(2*t).concat(e)))}class ie{validate_graph(e){const t=[],n=e.get_nodes_by_type("start");1!==n.length&&t.push([`graph must have exactly one start node (has ${n.length})`]);const o=e.get_nodes_by_type("end");0===o.length&&t.push(["graph must have atleast one end node"]);const a={};for(const d of e.nodes){const e=this.da_node_get_id(d);e in a?(a[e].amount+=1,a[e].nodes.push(d)):a[e]={amount:1,nodes:[d]},"start"==d.gd.type&&1!==d.get_edges_out().length?t.push(["start node ",d,` must have 1 outgoing edge (has ${d.get_edges_out().length})`]):"decision"==d.gd.type&&0===d.get_edges_in().length?t.push(["decision node ",d," must have atleast one ingoing edge"]):"decision"==d.gd.type&&0===d.get_edges_out().length?t.push(["decision node ",d," must have atleast one outgoing edge"]):"notice"==d.gd.type&&0===d.get_edges_in().length?t.push(["notice node ",d," must have atleast one ingoing edge"]):"notice"==d.gd.type&&1!==d.get_edges_out().length?t.push(["notice node ",d," must have one outgoing edge"]):"end"==d.gd.type&&0===d.get_edges_in().length&&t.push(["end node ",d," must have atleast one ingoing edge"])}for(const[d,{amount:i,nodes:l}]of Object.entries(a)){console.log(d,i,l);const e=[];l.forEach(((t,n)=>{e.push(t),n1&&t.push([`variable name '${d}' occurs is defined more than once, in the nodes: `,...e])}const s=e.get_nodes_by_type("decision");for(const d of s){let e=!1;const n={},o=d.get_edges_out();for(const t of o)null==t.gd.content&&(e=!0),null!=t.gd.content&&(n[t.gd.content]=n[t.gd.content]+1||1);e&&t.push(["decision node ",d," has atleast one outgoing edge with no content"]),Object.entries(n).forEach((([e,n])=>{if(n>1){const n=o.filter((t=>t.gd.content=e)),a=["the decision node ",d,` has multiple edges with content '${n[0].gd.content}' on the edges: `];n.forEach(((e,t)=>{a.push(e),t0===e.get_edges_in().length));let a=[...e.edges];while(o.length>0){const e=o.pop();n.push(e);for(const t of a.filter((t=>t.node_from_id==e.id))){const e=t.get_node_to();a=a.filter((e=>!(e.id==t.id))),0===a.filter((t=>t.node_to_id==e.id)).length&&o.push(e)}}a.length>0&&t.push(["graph must not contain cycles/loops"])}return t}da_node_get_id(e){return e.gd.variable??`${e.gd.type}_${e.id.toString().substring(0,8)}`}da_build_logic(e,t){const n=t.get_edges_out(),o=[];switch(t.gd.type){case"start":{o.push(`def get_outcome_${this.da_node_get_id(t)}():`),o.push(...de([this.da_node_get_id(t)]));const a=[];for(const t of n)a.push(...this.da_build_logic(e,t.get_node_to()));a.length>0?o.push(...de(a)):o.push(...de(["pass"])),o.push(`outcome = get_outcome_${this.da_node_get_id(t)}()`);break}case"end":o.push(`return ${this.da_node_get_id(t)}`);break;case"decision":for(const a of n){const n=a.gd.content;if(null==n)continue;const s=this.da_build_logic(e,a.get_node_to());o.push(`if ${this.da_node_get_id(t)} == '${a.gd.content}':`),o.push(...de(s||["pass"],1))}break;case"notice":o.push(`${this.da_node_get_id(t)}`);for(const t of n)o.push(...this.da_build_logic(e,t.get_node_to()));break}return o}out(e){const t=e.get_nodes_by_type("start")[0],n=e.get_nodes_by_type("end"),o=[];for(const d of e.nodes)switch(d.gd.type){case"start":o.push(["question: Start",`subquestion: '${d.get_content()}'`,`continue button field: ${this.da_node_get_id(d)}`]);break;case"end":break;case"decision":{const t=e.edges.filter((e=>e.node_from_id==d.id));let n=[];for(const e of t)null!=e.gd.content&&n.push(` - "${e.gd.content}"`);n.sort(),n.length>0&&(n=["buttons:",...n]),o.push(["question: Question",`subquestion: '${d.get_content()}'`,`field: ${this.da_node_get_id(d)}`,...n]);break}case"notice":o.push(["question: Notice",`subquestion: '${d.get_content()}'`,`continue button field: ${this.da_node_get_id(d)}`]);break}const a=[];for(const d of n??[])a.push(...de([`${this.da_node_get_id(d)} = '${d.get_content()}'`]));a.push(...de(this.da_build_logic(e,t))),a.length>0&&o.push(["code: |",...a]),o.push(["mandatory: True","question: End","subquestion: ${outcome}"]);let s=o.map((e=>"string"==typeof e?e:Array.isArray(e)?e.join("\n"):void 0)).join("\n---\n");return s}}class le{in(e,t){e.clear();const n={nodes:t.getNodes(),edges:t.getEdges()};for(const o of n.nodes){const t=o.getData(),n={id:o.id,gd:t.gd,appearance:{x:o.getPosition().x??0,y:o.getPosition().y??0,width:o.getSize().width??$[t.gd.type].antv_metadata.width,height:o.getSize().height??$[t.gd.type].antv_metadata.height}};e.add_node(n)}for(const o of n["edges"]){if(null==o.getSourceCell()||null==o.getTargetCell())continue;let t=o.getLabelAt(0)?.attrs?.text?.text?.toString()??null;""==t&&(t=null);const n={id:o.id,node_from_id:o.getSourceCellId(),node_to_id:o.getTargetCellId(),gd:{content:t},appearance:{vertices:o.getVertices()}};e.add_edge(n)}return e}out(e){const t=[];let n=0;Object.values(e.nodes).forEach((e=>{let o={...$[e.gd.type].antv_metadata,id:e.id,x:e.appearance?.x??(n+=50),y:e.appearance?.y??50,data:{gd:e.gd}};o=Object.assign({},$[e.gd.type].antv_metadata??$.notice.antv_metadata??{},o),t.push(o)}));const o=[];Object.values(e.edges).forEach((e=>{const t=f(e.gd.content),n={...v,id:e.id,labels:null!=t?[t]:[],source:{cell:e.node_from_id,port:"out-1"},target:{cell:e.node_to_id,port:"in-1"},data:{gd:e.gd}};o.push(n)}));const a={nodes:t,edges:o};return a}}function re(e,...t){const n={};return t.forEach((t=>{n[t]=e[t]})),n}class ce{in_json(e,t){e.clear(),e.name=t.name;for(const n of t.nodes)e.add_node(n);for(const n of t.edges)e.add_edge(n);return e}out_json(e){const t={nodes:e.nodes.map((e=>re(e,"id","appearance","gd"))),edges:e.edges.map((e=>re(e,"id","node_from_id","node_to_id","gd"))),name:e.name};return t}}var ue=class{constructor(e){(0,l.Z)(this,"graph",void 0),(0,l.Z)(this,"json",void 0),(0,l.Z)(this,"antvis",void 0),(0,l.Z)(this,"docassemble",void 0),this.graph=e??new b,this.json=new ce,this.antvis=new le,this.docassemble=new ie}in_json(e){return this.graph=this.json.in_json(this.graph,e),this}out_json(){return this.json.out_json(this.graph)}in_antv(e){return this.graph=this.antvis.in(this.graph,e),this}out_antv(){return this.antvis.out(this.graph)}out_docassemble(){return this.docassemble.out(this.graph)}},ge=n(2);const pe={class:"toolbar"},he={class:"toolbar-item"},_e=["disabled"],be={class:"toolbar-item"},fe=["disabled"],ve={class:"toolbar-item"},me=["disabled"],ye={class:"toolbar-item"},we=["disabled"],ke={class:"toolbar-item"},xe=["disabled"];var De=(0,a.aZ)({props:{graph:{type:i.kJ},docassemble_cont_update:{type:Function},init_modeler:{type:Function}},setup(e){const t=e,n=(0,ge.pm)(),{Dnd:o}=i.e9,s=()=>{if(confirm("Are you sure you want to load the example flowchart?")){const e={nodes:[{id:"9ed5d853-62a0-4395-afb9-d94e8cffd2cd",appearance:{x:270,y:40,width:180,height:36},gd:{type:"start",content:"walk or bus?",variable:"walk_or_bus"}},{id:"b8bdd58d-ab1f-44d0-82b8-5edb21f3d484",appearance:{x:270,y:110,width:180,height:36},gd:{type:"decision",content:"is it raining?",variable:"is_raining"}},{id:"396a3b5e-a0cd-49c4-96c3-c65a8da0c483",appearance:{x:90,y:190,width:180,height:36},gd:{type:"notice",content:"take an umbrella",variable:"notice_take_umbrella"}},{id:"d9a60522-cc80-40bf-b691-5e51b27b0e6c",appearance:{x:90,y:260,width:180,height:36},gd:{type:"end",content:"take the bus",variable:"end_bus"}},{id:"20e3d21e-0799-4de7-8d1e-6cac260279ad",appearance:{x:470,y:260,width:180,height:36},gd:{type:"end",content:"take a walk",variable:"end_walk"}}],edges:[{id:"5106836e-d49c-4d33-9ed4-c6b5048ee11f",node_from_id:"b8bdd58d-ab1f-44d0-82b8-5edb21f3d484",node_to_id:"396a3b5e-a0cd-49c4-96c3-c65a8da0c483",gd:{content:"Yes"}},{id:"b81563a8-ad65-4d7e-86df-efbb0cf7fad4",node_from_id:"b8bdd58d-ab1f-44d0-82b8-5edb21f3d484",node_to_id:"20e3d21e-0799-4de7-8d1e-6cac260279ad",gd:{content:"No"}},{id:"3008df09-bacb-4a33-9b3e-8e248e858c2b",node_from_id:"396a3b5e-a0cd-49c4-96c3-c65a8da0c483",node_to_id:"d9a60522-cc80-40bf-b691-5e51b27b0e6c",gd:{content:null}},{id:"90c865d8-fbc3-4b7b-b0a3-46a8f1468c3e",node_from_id:"9ed5d853-62a0-4395-afb9-d94e8cffd2cd",node_to_id:"b8bdd58d-ab1f-44d0-82b8-5edb21f3d484",gd:{content:null}}],name:"Untitled graph"},n=(new ue).in_json(e).out_antv();t.graph?.fromJSON(n),t.docassemble_cont_update()}},d=()=>{const e=prompt("Enter the JSON you wish to import");if(e){const o=JSON.parse(e);if(o){const e=(new ue).in_json(o).out_antv();t.graph?.fromJSON(e),t.docassemble_cont_update()}else n.error("Failed to parse import")}},l=()=>{t.graph?.undo()},r=()=>{t.graph?.redo()},c=()=>{confirm("Are you sure you want to reset your workspace?")&&t.graph?.removeCells(t.graph.getCells())};return(t,n)=>((0,a.wg)(),(0,a.iD)("div",pe,[(0,a._)("div",he,[(0,a._)("button",{disabled:"undefined"===typeof e.graph,onClick:n[0]||(n[0]=e=>l())},"Undo",8,_e)]),(0,a._)("div",be,[(0,a._)("button",{disabled:"undefined"===typeof e.graph,onClick:n[1]||(n[1]=e=>r())},"Redo",8,fe)]),(0,a._)("div",ve,[(0,a._)("button",{disabled:"undefined"===typeof e.graph,onClick:n[2]||(n[2]=e=>c())},"Clear",8,me)]),(0,a._)("div",ye,[(0,a._)("button",{class:"bg-blue-200",disabled:"undefined"===typeof e.graph,onClick:n[3]||(n[3]=e=>d())},"Import JSON",8,we)]),(0,a._)("div",ke,[(0,a._)("button",{class:"bg-blue-200",disabled:"undefined"===typeof e.graph,onClick:n[4]||(n[4]=e=>s())},"Load default example",8,xe)])]))}});const $e=De;var Ce=$e;const je=(0,a._)("span",{class:"block font-medium mb-2"},"Validation errors",-1),Oe={class:"list-disc list-inside"},Se={key:1,class:"block text-green-800"};var Ee=(0,a.aZ)({props:{formatted_validation_errors:null},setup(e){const t=e;return(e,n)=>((0,a.wg)(),(0,a.iD)("div",{class:(0,s.C_)(["border border-gray-500 rounded mt-4 mb-2 py-2 px-3",{"bg-red-50":t.formatted_validation_errors.length>0}])},[t.formatted_validation_errors.length>0?((0,a.wg)(),(0,a.iD)(a.HY,{key:0},[je,(0,a._)("ul",Oe,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(t.formatted_validation_errors,((e,t)=>((0,a.wg)(),(0,a.iD)("li",{class:"validation-error text-red-900",key:t},[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e,(e=>((0,a.wg)(),(0,a.iD)(a.HY,{key:e},[e.__v_isVNode?((0,a.wg)(),(0,a.j4)((0,a.LL)(e),{key:0})):((0,a.wg)(),(0,a.iD)(a.HY,{key:1},[(0,a.Uk)((0,s.zw)(e),1)],64))],64)))),128))])))),128))])],64)):((0,a.wg)(),(0,a.iD)("span",Se,"Graph contains no errors"))],2))}});const He=Ee;var Ne=He;const Ae={class:"mb-4"},Te=(0,a._)("h1",{class:"text-4xl font-serif inline"},"GraphDoc",-1),Ie={key:0,class:"text-sm"},Pe=(0,a._)("p",{class:"mt-2"}," This tool serves as a PoC to convert flowcharts (which can be represented as directed acyclic graphs) to docassemble interviews. The goal of this tool is to provide an intuitive interface for constructing docassemble interviews, in which relations and dependencies between nodes ('blocks') are more clearly visible. ",-1),Ue=(0,a._)("h2",{class:"text-lg font-serif mt-2 mb-1"},"Instructions",-1),qe=(0,a._)("p",null," Start by dragging nodes from the left sidebar. Connect nodes by dragging edges from and to the ports of the nodes. Configure nodes and edges by clicking on their cells and filling in the details in the config sidebar on the right. Nodes and edges can also be removed from this sidebar. If no output is produced, interpret the validation errors presented above the docassemble output window. For an example of a well structured graph, click on 'Load example'. ",-1),ze=[Pe,Ue,qe],Ye={class:"border border-gray-400 rounded overflow-hidden"},Ze={class:"w-full bg-gray-100"},Le={class:"w-full flex",style:{height:"500px"}},Me={class:"w-20 flex-initial bg-gray-100 border-t border-gray-200"},Fe=(0,a._)("div",{id:"modeler-container-box",class:"flex flex-grow border-4 border-b-0 border-gray-300"},[(0,a._)("div",{id:"modeler-container",style:{flex:"1"}})],-1),Je={class:"w-64 flex-initial bg-gray-100 border-t border-gray-200 overflow-y-auto"},Re={class:"my-4"},Ve=(0,a._)("span",{class:"text-lg block mb-1"},"Docassemble interview output",-1),Ge={class:"text-sm text-gray-700"},We=(0,a.Uk)(" Include a copy of the model "),Be={class:"relative"},Ke={class:"w-full min-h-4 font-mono border rounded p-2 mt-1 whitespace-pre-wrap",id:"docassemble_out_container"};var Xe=(0,a.aZ)({setup(e){const t=(0,d.iH)(!1);(0,a.bv)((()=>{v(),h()}));(0,d.iH)({});const n=(0,d.iH)(),l=(0,d.iH)();function r(e){"undefined"!==typeof e&&(l.value=e,n.value?.select(e),n.value?.scrollToCell(e))}const c=(0,d.iH)([]),u=(0,d.iH)([]),g=(0,d.iH)(""),p=(0,d.qj)({include_json_export:!0});(0,a.YP)((()=>p),(e=>{console.log("options updated"),h()}),{deep:!0});const h=()=>{if("undefined"==typeof n.value)return;const e=(new ue).in_antv(n.value);c.value=(new ie).validate_graph(e.graph),n.value.getCells().forEach((e=>"undefined"!==typeof e.getData()?.errors&&e.setData({errors:!1},{no_da_update:!0}))),u.value=c.value.map((e=>e.map((e=>{if("string"===typeof e)return e;if(e.is_node()){const t=e,o=n.value?.getCellById(t.id);return"undefined"!==typeof o?(o.setData({errors:!0},{no_da_update:!0}),(0,a.h)("span",{onClick(e){r(o)},class:"clickable-entity"},t.get_label())):`"${t.get_label()}""`}if(e.is_edge()){const t=e,o=n.value?.getCellById(t.id),s=t.gd.content?`with content ${t.gd.content}`:`leaving from node ${t.get_node_from().get_label()}`;return"undefined"!==typeof o?(0,a.h)("span",{onClick(e){r(n.value?.getCellById(t.gd.content?t.id:t.node_from_id))},class:"clickable-entity"},s):`"${s}"`}return""})))),0==u.value.length?(g.value=e.out_docassemble(),g.value&&p.include_json_export&&(g.value=g.value.concat("\n---\n# [START INLINE GRAPHDOC EXPORT]").concat("\n# ").concat(JSON.stringify(e.out_json())).concat("\n# [END INLINE GRAPHDOC EXPORT]"))):g.value="-"},_=(0,d.iH)("COPY"),b=()=>{window.getSelection().selectAllChildren(document.getElementById("docassemble_out_container")),navigator.clipboard.writeText(g.value).then((()=>{_.value="COPIED!",setTimeout((()=>{_.value="COPY"}),1200)})).catch((e=>{_.value="FAILED",setTimeout((()=>{_.value="COPY"}),1200),console.log("Failed to copy",e)}))},f=e=>{e.on("cell:change:*",(e=>{e.options.no_da_update||("target"==e.key?typeof e.current.cell!=typeof e.previous.cell&&h():["target","zIndex","tools","position"].includes(e.key)||h())})),e.on("cell:removed",h),e.on("cell:added",h),e.on("cell:selected",(({cell:e,options:t})=>{l.value!=e&&(l.value=e)})),e.on("cell:unselected",(({cell:e,options:t})=>{null!=l.value&&(l.value=void 0)})),e.on("blank:click",(({e:e,x:t,y:n})=>{null!=l.value&&(l.value=void 0)}))},v=()=>{let e=document.getElementById("modeler-container");e.scrollWidth,e.scrollHeight;n.value=new i.kJ({...m,container:e,autoResize:!0}),void 0!=n.value&&(y(n.value),f(n.value),h())};return(e,i)=>((0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a._)("div",Ae,[(0,a._)("span",null,[Te,(0,a._)("button",{onClick:i[0]||(i[0]=e=>t.value=!t.value),class:"font-normal underline-offset-4 underline hover:no-underline pl-6 py-1 px-2 text-gray-600 hover:text-gray-900"},"read "+(0,s.zw)(t.value?"less":"more"),1)]),t.value?((0,a.wg)(),(0,a.iD)("div",Ie,ze)):(0,a.kq)("",!0)]),(0,a._)("div",Ye,[(0,a._)("div",Ze,[(0,a.Wm)(Ce,{graph:n.value,docassemble_cont_update:h,init_modeler:v},null,8,["graph"])]),(0,a._)("div",Le,[(0,a._)("div",Me,[null!==n.value?((0,a.wg)(),(0,a.j4)(se,{key:0,graph:n.value},null,8,["graph"])):(0,a.kq)("",!0)]),Fe,(0,a._)("div",Je,[(0,a.Wm)(ee,{cell:l.value},null,8,["cell"])])])]),(0,a.Wm)(Ne,{formatted_validation_errors:u.value},null,8,["formatted_validation_errors"]),(0,a._)("div",Re,[Ve,(0,a._)("label",Ge,[(0,a.wy)((0,a._)("input",{type:"checkbox",class:"mr-1","onUpdate:modelValue":i[1]||(i[1]=e=>(0,d.SU)(p).include_json_export=e)},null,512),[[o.e8,(0,d.SU)(p).include_json_export]]),We]),(0,a._)("div",Be,[(0,a._)("div",Ke,(0,s.zw)(g.value),1),(0,a._)("span",{class:"copy-button",onClick:i[2]||(i[2]=e=>b())},(0,s.zw)(_.value),1)])])],64))}});const Qe=Xe;var et=Qe;const tt={class:"mb-8 mt-4 mx-auto max-w-6xl"};var nt=(0,a.aZ)({setup(e){return(0,a.bv)((()=>{console.log("Editor window mounted.")})),(e,t)=>((0,a.wg)(),(0,a.iD)("div",tt,[(0,a.Wm)(et)]))}});const ot=nt;var at=ot;const st={class:""};var dt=(0,a.aZ)({setup(e){return(e,t)=>((0,a.wg)(),(0,a.iD)("div",st,[(0,a.Wm)(at)]))}});const it=dt;var lt=it;(0,o.ri)(lt).mount("#app")}},t={};function n(o){var a=t[o];if(void 0!==a)return a.exports;var s=t[o]={exports:{}};return e[o].call(s.exports,s,s.exports,n),s.exports}n.m=e,function(){var e=[];n.O=function(t,o,a,s){if(!o){var d=1/0;for(c=0;c=s)&&Object.keys(n.O).every((function(e){return n.O[e](o[l])}))?o.splice(l--,1):(i=!1,s0&&e[c-1][2]>s;c--)e[c]=e[c-1];e[c]=[o,a,s]}}(),function(){n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,{a:t}),t}}(),function(){n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){var e={143:0};n.O.j=function(t){return 0===e[t]};var t=function(t,o){var a,s,d=o[0],i=o[1],l=o[2],r=0;if(d.some((function(t){return 0!==e[t]}))){for(a in i)n.o(i,a)&&(n.m[a]=i[a]);if(l)var c=l(n)}for(t&&t(o);r = {\n appearance: {\n x: 0, y: 0,\n width: 100, height: 100\n },\n gd: {\n type: 'notice', // notice is most generic\n content: null,\n variable: null\n },\n}\n\nexport class Node {\n\n constructor(options: Partial & Pick) {\n if (typeof options.id == \"undefined\")\n options.id = uuid();\n // options.variable = `${options.id}`;\n\n Object.assign(this, NodeDefault, options);\n }\n\n // not sure if this is the best method of determining the type\n is_node() { return true; }\n is_edge() { return false; }\n\n get_label() {\n return this.gd.variable ?? this.gd.content ?? this.id.substring(0, 8);\n }\n \n get_content() {\n return this.gd.content ?? `[content of node ${ this.id.substring(0, 8) }]`\n }\n \n get_edges_in() {\n return this.graph.edges\n .filter(edge => edge.node_to_id == this.id)\n }\n\n get_edges_out() {\n return this.graph.edges\n .filter(edge => edge.node_from_id == this.id)\n }\n\n get_nodes_in() {\n const node_ids = this.get_edges_in()\n .map(edge => edge.node_from_id) ?? []; // only return node_ids\n return this.graph.nodes\n .filter(node => node_ids.includes(node.id));\n }\n\n get_nodes_out() {\n const node_ids = this.get_edges_out()\n .map(edge => edge.node_to_id) ?? [];\n return this.graph.nodes\n .filter(node => node_ids.includes(node.id));\n }\n\n}\n\n\nexport interface Edge {\n graph: Graph\n id: Id,\n node_from_id: Id,\n node_to_id: Id,\n \n gd: {\n content: string | null,\n }\n}\n\nexport const EdgeDefault: Partial = {\n gd: {\n content: null,\n }\n}\n\nexport class Edge {\n\n constructor(options: Partial & Pick) {\n options.id = options.id ?? uuid()\n\n Object.assign(this, EdgeDefault, options);\n }\n\n/*\n constructor(graph: Graph, id: Id | null = null, node_from_id: Id, node_to_id: Id, content: string | null = null) {\n this.graph = graph;\n this.id = id ?? get_id();\n\n this.node_from_id = node_from_id;\n this.node_to_id = node_to_id;\n this.content = content;\n }\n*/\n\n is_node() { return false; }\n is_edge() { return true; }\n\n get_node_from() {\n return this.graph.nodes\n .filter(node => node.id == this.node_from_id)[0]\n }\n\n get_node_to() {\n return this.graph.nodes\n .filter(node => node.id == this.node_to_id)[0]\n }\n\n}\n\nclass Graph {\n name;\n nodes: Array = [];\n edges: Array = [];\n\n constructor(name = 'Untitled graph') {\n this.name = name;\n }\n\n get_nodes_by_type(type: keyof node_types) {\n return this.nodes.filter(x => x.gd.type == type) ?? [];\n }\n\n // add_node(options: Partial) {\n add_node(options: Partial & Pick) {\n this.nodes.push(new Node({...options, graph: this}))\n }\n\n add_edge(options: Partial & Pick) {\n this.edges.push(new Edge({...options, graph: this}))\n }\n \n clear() {\n this.nodes = [];\n this.edges = [];\n }\n \n}\n\nexport default Graph","\nimport { Cell, Graph, Node as AntvNode, Path } from '@antv/x6';\nimport { Options } from '@antv/x6/lib/graph/options';\n\nimport { Node, NodeDefault } from './graph';\n\n// import '@antv/x6-vue-shape'\n\nexport const default_edge_label = (text: string | null = '') => {\n if (text == null)\n return null;\n\n return {\n attrs: {\n text: {\n text: text,\n }\n },\n position: {\n distance: .40,\n },\n }\n}\n\nexport const default_edge_attrs = {\n // shape: 'dag-edge',\n attrs: {\n line: {\n strokeWidth: '1',\n },\n },\n zIndex: -1,\n}\n\nexport const graph_options_defaults: Partial = {\n grid: true,\n\n background: {\n color: 'white'\n },\n\n mousewheel: {\n enabled: true,\n zoomAtMousePosition: true,\n modifiers: 'ctrl',\n minScale: 0.5,\n maxScale: 3,\n },\n\n scroller: {\n enabled: true,\n pannable: true,\n },\n\n connecting: {\n\n // https://x6.antv.vision/en/docs/tutorial/intermediate/interacting/#%E8%BF%9E%E7%BA%BF%E8%A7%84%E5%88%99\n allowBlank: false,\n allowMulti: false,\n allowLoop: false,\n allowEdge: false,\n\n allowNode: false,\n allowPort: true,\n\n highlight: true,\n snap: true,\n\n // https://x6.antv.vision/en/examples/showcase/practices#dag\n connector: 'algo-connector',\n connectionPoint: 'boundary',\n anchor: 'top',\n\n validateMagnet({ e, magnet, view, cell }) {\n // console.log(\"magnet\", e, magnet, view, cell)\n return magnet.getAttribute('port-group') !== 'in'\n },\n createEdge(this) {\n return this.createEdge(default_edge_attrs)\n },\n\n validateEdge({edge, type, previous}) {\n // console.log(\"edge data\", edge)\n // TODO: only allow (multiple) for decision\n return true;\n },\n\n validateConnection({edge, sourceMagnet, targetMagnet}) {\n if (sourceMagnet == null || targetMagnet == null)\n return false;\n \n return sourceMagnet.getAttribute('port-group') == \"out\" &&\n targetMagnet.getAttribute('port-group') == \"in\";\n },\n },\n\n history: {\n enabled: true,\n beforeAddCommand(event: any, args: any) {\n // console.log(event, args);\n // prevent adding/removing tools on hover to be added to history\n if (args.key == 'tools')\n {\n return false\n }\n },\n },\n resizing: {\n enabled: false,\n },\n selecting: {\n enabled: true,\n multiple: false,\n \n },\n\n}\n\nexport function graph_register_defaults(graph: Graph) {\n /*\n // https://x6.antv.vision/en/docs/api/registry/edge-tool\n graph.on('edge:mouseenter', ({ cell }) => {\n // console.log(cell)\n cell.addTools(\n [\n {\n name: 'button-remove',\n args: {\n distance: 30,\n fill: '#000000'\n },\n },\n ]\n )\n })\n graph.on('edge:mouseleave', ({ cell }) => {\n setTimeout(() => {\n cell.removeTool('button-remove')\n }, 1500)\n })\n */\n\n graph.on('node:mouseenter', ({ cell }) => {\n cell.addTools([{name: 'button-remove'}])\n })\n\n graph.on('node:mouseleave', ({ cell }) => {\n setTimeout(() => {\n cell.removeTool('button-remove')\n }, 1000)\n })\n\n Graph.registerConnector('algo-connector', (s, e) => {\n const offset = 4\n const deltaY = Math.abs(e.y - s.y)\n const control = Math.floor((deltaY / 3) * 2)\n \n const v1 = { x: s.x, y: s.y + offset + control }\n const v2 = { x: e.x, y: e.y - offset - control }\n \n return Path.normalize(\n `M ${s.x} ${s.y}\n L ${s.x} ${s.y + offset}\n C ${v1.x} ${v1.y} ${v2.x} ${v2.y} ${e.x} ${e.y - offset}\n L ${e.x} ${e.y}\n `,\n )\n }, true)\n\n}\n\nconst default_port_groups = {\n in: {\n attrs: {\n circle: {\n r: 6,\n stroke: \"#6a6a6b\",\n magnet: true,\n }\n },\n // markup: {\n // tagName: 'path',\n // selector: 'path',\n // attrs: {\n // d: \"M 0 5 L 6.25 -5 L -6.25 -5 L 0 5\",\n // fill: \"#fff\",\n // stroke: \"#6a6a6b\",\n // 'stroke-width': \"1\",\n // magnet: true\n // }\n // },\n position: 'top'\n },\n out: {\n attrs: {\n circle: {\n r: 6,\n stroke: \"#6a6a6b\",\n magnet: true,\n }\n },\n // markup: {\n // tagName: 'path',\n // selector: 'path',\n // attrs: {\n // d: \"M 0 -5 L 6.25 5 L -6.25 5 L 0 -5\",\n // fill: \"#fff\",\n // stroke: \"#6a6a6b\",\n // 'stroke-width': \"1\",\n // magnet: true\n // }\n // },\n position: 'bottom'\n },\n}\n\nexport function default_node_ports(ports: Array) {\n const default_ports = {\n groups: default_port_groups,\n items: [] as {id: string, group: keyof typeof default_port_groups}[]\n }\n\n for (const port_group of ports) {\n default_ports.items.push({\n id: `${port_group}-1`,\n group: port_group,\n })\n }\n\n return default_ports\n}\n\nexport type node_types = {\n [\n key in \"start\" | \"notice\" | \"decision\" | \"end\"\n ]: {\n antv_metadata: Omit & {data: Partial}, // override 'data' type of antv\n config_fields: {\n general?: string[],\n additional?: string[]\n }\n }\n};\nexport const node_type_default = 'notice';\n\n// export type AntvNodeData = Partial & Pick;\n// export type AntvNodeData = Pick \n// & { errors?: boolean };\nexport type AntvNodeData = {\n errors?: boolean,\n // gd for 'graphdoc' model\n // gd: Partial & Pick \n // Partial> are optional data entries, Pick<...> are required.\n // gd: Partial> & Pick \n\n gd: Node['gd']\n}\n\nconst node_html = {\n render(node: AntvNode) {\n const data = node.getData() as AntvNodeData;\n\n let label = '';\n let label_class = '';\n\n if (data.gd.variable) {\n label = data.gd.variable;\n label_class = 'node-label-variable';\n } else if (data.gd.content) {\n label = `\"${data.gd.content}\"`;\n label_class = 'node-label-content';\n } else {\n label = `unnamed ${data.gd.type} node`;\n label_class = 'node-label-unnamed';\n }\n\n return(\n `
\n ${ label }\n
`\n )\n },\n shouldComponentUpdate(node: AntvNode) {\n return node.hasChanged('data')\n },\n}\n\nexport const node_types: node_types = {\n // https://github.com/eensander/graph-quiz/blob/master/resources/js/components/dashboard/graph/GraphModeler.vue#L112\n start: {\n antv_metadata: {\n shape: 'html',\n html: node_html,\n // tools: ['button-remove'],\n width: 180,\n height: 36,\n data: {\n gd: Object.assign({}, NodeDefault.gd, {\n type: 'start'\n }),\n },\n ports: default_node_ports(['out']),\n },\n config_fields: {\n general: [\n 'variable',\n 'label',\n ],\n additional: [\n // 'annotation'\n ],\n }\n },\n decision: {\n antv_metadata: {\n shape: 'html',\n html: node_html,\n // tools: ['button-remove'],\n width: 180,\n height: 36,\n\n data: {\n gd: Object.assign({}, NodeDefault.gd, {\n type: 'decision'\n }),\n },\n ports: default_node_ports(['in', 'out']),\n },\n config_fields: {\n general: [\n 'variable',\n 'label',\n ],\n additional: [\n // 'annotation',\n // 'subgraph'\n ],\n }\n },\n notice: {\n antv_metadata: {\n shape: 'html',\n html: node_html,\n // tools: ['button-remove'],\n width: 180,\n height: 36,\n \n data: {\n gd: Object.assign({}, NodeDefault.gd, {\n type: 'notice'\n }),\n },\n ports: default_node_ports(['in', 'out']),\n },\n config_fields: {\n general: [\n 'variable',\n 'label',\n ],\n additional: [\n // 'annotation'\n ],\n }\n },\n end: {\n antv_metadata: {\n shape: 'html',\n html: node_html,\n // tools: ['button-remove'],\n width: 180,\n height: 36,\n \n data: {\n gd: Object.assign({}, NodeDefault.gd, {\n type: 'end'\n }),\n },\n ports: default_node_ports(['in']),\n },\n config_fields: {\n general: [\n 'variable',\n 'label',\n ],\n }\n }\n}","// from: https://stackoverflow.com/a/63511295/17864167\nexport default function(str: string){\n return str[0].toUpperCase() + str.slice(1).toLowerCase();\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, unref as _unref, toDisplayString as _toDisplayString, renderList as _renderList, Fragment as _Fragment, isRef as _isRef, vModelText as _vModelText, withDirectives as _withDirectives } from \"vue\"\n\nconst _hoisted_1 = { key: 0 }\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"block p-2 text-gray-700\" }, \"Select a node or edge to configure\", -1)\nconst _hoisted_3 = [\n _hoisted_2\n]\nconst _hoisted_4 = {\n key: 1,\n class: \"w-full\"\n}\nconst _hoisted_5 = { class: \"\" }\nconst _hoisted_6 = { class: \"m-2 font-bold block text-2xl border-b border-gray-300\" }\nconst _hoisted_7 = { class: \"p-2\" }\nconst _hoisted_8 = { class: \"p-2\" }\nconst _hoisted_9 = { class: \"my-2 block border-b border-gray-300 uppercase font-bold text-sm text-gray-800\" }\nconst _hoisted_10 = { key: 0 }\nconst _hoisted_11 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"text-gray-700 block mb-1\" }, \"Variable\", -1)\nconst _hoisted_12 = { key: 1 }\nconst _hoisted_13 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"text-gray-700 block mb-1\" }, \"Content\", -1)\nconst _hoisted_14 = {\n key: 2,\n class: \"w-full\"\n}\nconst _hoisted_15 = { class: \"\" }\nconst _hoisted_16 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"m-2 font-bold block text-2xl border-b border-gray-300\" }, \"Edge\", -1)\nconst _hoisted_17 = { class: \"p-2\" }\nconst _hoisted_18 = {\n key: 0,\n class: \"p-2\"\n}\nconst _hoisted_19 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"my-2 block border-b border-gray-300 uppercase font-bold text-sm text-gray-800\" }, \"General\", -1)\nconst _hoisted_20 = { class: \"block mt-2\" }\nconst _hoisted_21 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"text-gray-700 block mb-1\" }, \"Label\", -1)\nconst _hoisted_22 = { class: \"w-full my-2 text-right\" }\nconst _hoisted_23 = { key: 3 }\nconst _hoisted_24 = /*#__PURE__*/_createElementVNode(\"span\", null, \"Invalid cell selected\", -1)\nconst _hoisted_25 = [\n _hoisted_24\n]\n\nimport { computed, ref } from 'vue';\n import { default_edge_label, node_types, node_type_default, AntvNodeData } from '@/utils/antv-model'\n\n import { Cell, Edge, Node } from '@antv/x6'\n\n import titleCase from '@/utils/data/titleCase';\n\n \nexport default /*#__PURE__*/_defineComponent({\n props: {\n cell: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n cell: Cell | undefined\n }\n\n\n \n \n const current_fields = computed(() => {\n const field = props.cell?.getData()?.node_type ?? node_type_default;\n let current_node_fields = null;\n\n if (Object.keys(node_types).includes(field))\n current_node_fields = node_types[field as keyof node_types].config_fields;\n else\n current_node_fields = node_types[node_type_default].config_fields;\n\n // https://stackoverflow.com/a/62400741/17864167\n return Object.fromEntries(\n Object.entries(current_node_fields)\n .filter(([key, val]) => val.length > 0)\n )\n });\n\n const node_content = computed({\n get() {\n // https://github.com/antvis/X6/issues/2020#issuecomment-1104644438\n // return (props.cell as Node).getAttrByPath('text/text') as string\n\n return (props.cell as Node).getData().gd.content ?? '';\n },\n set(value: string) {\n // (props.cell as Node).setAttrByPath('text/text', value)\n\n (props.cell as Node).setData({gd: {content: value}});\n }\n });\n\n const node_variable = computed({\n get() {\n return ((props.cell as Node).getData() as AntvNodeData).gd.variable ?? '';\n },\n set(value: string) {\n (props.cell as Node).setData({gd: {variable: value != '' ? value : null}});\n }\n });\n\n // only reason for 'edge_content_ref' is for adding reactivity to edge_content,\n // relevant for pressing buttons\n const edge_content_ref = ref('');\n const edge_content = computed({\n get() {\n const edge = props.cell as Edge;\n edge_content_ref.value;\n return edge.getLabelAt(0)?.attrs?.text?.text?.toString() ?? '';\n },\n set(value: string) {\n const edge = props.cell as Edge;\n\n const edge_label = default_edge_label(value);\n if (edge_label != null) {\n edge.removeLabelAt(0);\n edge.setLabelAt(0, edge_label);\n }\n\n edge_content_ref.value = value;\n edge.setData({value})\n }\n });\n\n\nreturn (_ctx: any,_cache: any) => {\n return (__props.cell == null)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, _hoisted_3))\n : (__props.cell.isNode())\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"span\", _hoisted_6, _toDisplayString(_unref(titleCase)((__props.cell.data as AntvNodeData).gd.type)) + \" node\", 1),\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"button\", {\n onClick: _cache[0] || (_cache[0] = ($event: any) => (__props.cell?.remove())),\n class: \"action-btn-remove\"\n }, \"Remove\")\n ]),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(current_fields), (fields, field_group) => {\n return (_openBlock(), _createElementBlock(\"div\", { key: field_group }, [\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"span\", _hoisted_9, _toDisplayString(field_group), 1),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(fields, (field) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: field,\n class: \"block mt-2 mb-1\"\n }, [\n (field == 'variable')\n ? (_openBlock(), _createElementBlock(\"label\", _hoisted_10, [\n _hoisted_11,\n _createElementVNode(\"div\", null, [\n _withDirectives(_createElementVNode(\"input\", {\n class: \"w-full\",\n type: \"text\",\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(node_variable) ? (node_variable).value = $event : null))\n }, null, 512), [\n [_vModelText, _unref(node_variable)]\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (field == 'label')\n ? (_openBlock(), _createElementBlock(\"label\", _hoisted_12, [\n _hoisted_13,\n _createElementVNode(\"div\", null, [\n _withDirectives(_createElementVNode(\"textarea\", {\n style: {\"min-height\":\"3rem\"},\n class: \"w-full\",\n type: \"text\",\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (_isRef(node_content) ? (node_content).value = $event : null))\n }, null, 512), [\n [_vModelText, _unref(node_content)]\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n ])\n ]))\n }), 128))\n ])\n ]))\n : (__props.cell.isEdge())\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, [\n _createElementVNode(\"div\", _hoisted_15, [\n _hoisted_16,\n _createElementVNode(\"div\", _hoisted_17, [\n _createElementVNode(\"button\", {\n onClick: _cache[3] || (_cache[3] = ($event: any) => (__props.cell?.remove())),\n class: \"action-btn-remove\"\n }, \"Remove\")\n ]),\n ((__props.cell.getSourceCell()?.getData() as AntvNodeData).gd.type == 'decision')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_18, [\n _hoisted_19,\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"label\", null, [\n _hoisted_21,\n _withDirectives(_createElementVNode(\"input\", {\n type: \"text\",\n class: \"w-full\",\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => (_isRef(edge_content) ? (edge_content).value = $event : null))\n }, null, 512), [\n [_vModelText, _unref(edge_content)]\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_22, [\n _createElementVNode(\"button\", {\n class: \"inline btn mr-2\",\n onClick: _cache[5] || (_cache[5] = ($event: any) => (edge_content.value = 'Yes'))\n }, \"Yes\"),\n _createElementVNode(\"button\", {\n class: \"inline btn\",\n onClick: _cache[6] || (_cache[6] = ($event: any) => (edge_content.value = 'No'))\n }, \"No\")\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_23, _hoisted_25))\n}\n}\n\n})","import script from \"./GraphModelerConfigBar.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GraphModelerConfigBar.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./GraphModelerConfigBar.vue?vue&type=style&index=0&id=183a2d17&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = { class: \"shape-holder\" }\nconst _hoisted_2 = [\"data-type\"]\n\nimport { Dom, Addon, Graph, Node } from '@antv/x6';\n import { Dnd } from '@antv/x6/lib/addon/dnd';\n \n import { onMounted, Ref, ref, watch, computed } from 'vue';\n import { graph_options_defaults, node_types } from '@/utils/antv-model';\n\n \nexport default /*#__PURE__*/_defineComponent({\n props: {\n graph: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n graph: Graph | undefined,\n // node_type_defaults: Object\n }\n\n // https://github.com/antvis/X6/blob/master/sites/x6-sites-demos/packages/tutorial/basic/dnd/dnd/src/app.tsx\n\n \n\n const dnd: Ref = ref();\n\n onMounted(() => {\n // https://github.com/antvis/X6/blob/master/sites/x6-sites-demos/packages/tutorial/basic/dnd/dnd/src/app.tsx\n // https://x6.antv.vision/en/docs/tutorial/basic/dnd\n\n // console.log(dnd.value);\n })\n\n // computed(() => {\n // if (typeof props.graph !== \"undefined\")\n // init_dnd(props.graph)\n // })\n\n watch(() => props.graph, (value: typeof props.graph) => {\n if (typeof value !== \"undefined\")\n init_dnd(value)\n\n // console.log(\"node-create\", Node.create(node_types[\"notice\"]))\n })\n\n const init_dnd = (graph: Graph) => {\n dnd.value = new Addon.Dnd({\n target: graph,\n scaled: false,\n animation: true,\n validateNode(droppingNode, options) {\n // alert('validating')\n return true;\n // return droppingNode.shape === 'html'\n // ? new Promise((resolve) => {\n // const { draggingNode, draggingGraph } = options;\n // const view = draggingGraph.findView(draggingNode)\n // const contentElem = view.findOne('foreignObject > body > div');\n // Dom.addClass(contentElem, 'validating')\n // setTimeout(() => {\n // Dom.removeClass(contentElem, 'validating')\n // resolve(true)\n // }, 3000)\n // })\n // : true\n },\n })\n }\n \n const startDrag = (e: MouseEvent) => {\n if (typeof props.graph == \"undefined\")\n return false;\n\n /*\n const types = {\n 'rect': {\n width: 100,\n height: 40,\n attrs: {\n label: {\n text: 'Rect',\n fill: '#6a6c8a',\n },\n body: {\n stroke: '#31d0c6',\n strokeWidth: 2,\n },\n },\n },\n 'circle': {\n width: 100,\n height: 40,\n shape: 'html',\n html: () => {\n const wrap = document.createElement('div')\n wrap.style.width = '100%'\n wrap.style.height = '100%'\n wrap.style.display = 'flex'\n wrap.style.alignItems = 'center'\n wrap.style.justifyContent = 'center'\n wrap.style.border = '2px solid rgb(49, 208, 198)'\n wrap.style.background = '#fff'\n wrap.style.borderRadius = '100%'\n wrap.innerText = 'Circle'\n return wrap\n },\n }\n };\n */\n\n const target = e.currentTarget\n const type = (target as HTMLElement).getAttribute('data-type')!\n\n if (!(type in node_types)) {\n return false\n }\n\n const node = props.graph.createNode(node_types[type as keyof node_types].antv_metadata);\n\n // node.label = type\n // node.setData({label: type})\n \n // (node as any).setLabel(type)\n // node.setAttrByPath('text/text', type)\n node.setData({label: type})\n \n dnd.value?.start(node, e)\n\n }\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(node_types), (node_type, node_type_name) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: node_type_name,\n class: _normalizeClass(`node node-${node_type_name}`),\n \"data-type\": node_type_name,\n onMousedown: _cache[0] || (_cache[0] = ($event: any) => (startDrag($event)))\n }, _toDisplayString(node_type_name), 43, _hoisted_2))\n }), 128))\n ]))\n}\n}\n\n})","import script from \"./GraphModelerElementsBar.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GraphModelerElementsBar.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./GraphModelerElementsBar.vue?vue&type=style&index=0&id=f886c05c&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","// from: self\nexport function indent(lines: string[], indent = 1, spaces_per = 2): string[] {\n return lines.map(line => ' '.repeat(indent*2).concat(line))\n}","import { ITransformer } from \".\";\nimport Graph, { Edge, Node } from \"../graph\";\nimport { indent } from \"@/utils/data/indent\"\n\nexport type validationErrorPart = string | Node | Edge;\nexport type validationErrorList = Array[];\n\nexport class DocassembleTransformer implements ITransformer {\n\n validate_graph(graph: Graph): validationErrorList {\n const errors: validationErrorList = [];\n\n // General graph errors\n const node_start = graph.get_nodes_by_type('start');\n if (node_start.length !== 1)\n errors.push([`graph must have exactly one start node (has ${node_start.length})`]);\n const nodes_end = graph.get_nodes_by_type('end');\n if (nodes_end.length === 0)\n errors.push([`graph must have atleast one end node`])\n\n // General input/output amount errors, and uniqueness of ID's.\n const variable_list: {[variable: string]: {amount: number, nodes: Node[]}} = {};\n for (const node of graph.nodes) {\n\n // Add variables to list in this phase, to save iterations\n const node_var = this.da_node_get_id(node);\n if (node_var in variable_list) {\n variable_list[node_var].amount += 1;\n variable_list[node_var].nodes.push(node);\n } else {\n variable_list[node_var] = {amount: 1, nodes: [node]};\n }\n \n // Interpreting of edge amount errors\n if (node.gd.type == 'start' && node.get_edges_out().length !== 1)\n errors.push(['start node ', node, ` must have 1 outgoing edge (has ${node.get_edges_out().length})`])\n\n // else if (node.type == 'decision' && node.get_edges_out().length === 1)\n // errors.push(`decision node with label ${node.content} has one outgoing edge, which makes it purpose trivial`) // warning\n else if (node.gd.type == 'decision' && node.get_edges_in().length === 0)\n errors.push(['decision node ', node, ' must have atleast one ingoing edge'])\n else if (node.gd.type == 'decision' && node.get_edges_out().length === 0)\n errors.push(['decision node ', node, ' must have atleast one outgoing edge'])\n\n else if (node.gd.type == 'notice' && node.get_edges_in().length === 0)\n errors.push(['notice node ', node, ' must have atleast one ingoing edge'])\n else if (node.gd.type == 'notice' && node.get_edges_out().length !== 1)\n errors.push(['notice node ', node, ' must have one outgoing edge'])\n\n else if (node.gd.type == 'end' && node.get_edges_in().length === 0){\n errors.push(['end node ', node, ' must have atleast one ingoing edge'])\n }\n }\n\n // Checking variable names: duplicate and invalid names\n for (const [variable, {amount, nodes}] of Object.entries(variable_list)) {\n console.log(variable, amount, nodes)\n\n const seperated_error_nodes: (string | Node)[] = [];\n nodes.forEach((node, i) => {\n seperated_error_nodes.push(node);\n if (i < (nodes.length - 1))\n seperated_error_nodes.push(', ');\n })\n\n if (!variable.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/))\n errors.push([\n `invalid (python) variable name '${variable}' on the node(s): `,\n ...seperated_error_nodes\n ])\n\n if (amount > 1) {\n errors.push([\n `variable name '${variable}' occurs is defined more than once, in the nodes: `,\n ...seperated_error_nodes\n ]);\n }\n }\n\n // Decision-node specific errors\n const nodes_decision = graph.get_nodes_by_type('decision');\n for(const node_decision of nodes_decision) {\n let has_edge_out_content_null = false;\n\n const content_edges_out: {[content: string]: number} = {};\n const node_edges_out = node_decision.get_edges_out();\n\n for (const edge_out of node_edges_out) {\n if (edge_out.gd.content == null)\n has_edge_out_content_null = true;\n \n // if length == 1, to ensure it's only printed once\n // if (content_edges_out.filter(x => x == edge_out.content).length == 1)\n // errors.push(`decision node with label '${node_decision.content}' has multiple edges with content '${ edge_out.content }' (should be unique)`)\n \n if (edge_out.gd.content != null){\n // https://stackoverflow.com/a/39591024\n content_edges_out[edge_out.gd.content] = (content_edges_out[edge_out.gd.content]+1) || 1 ;\n }\n }\n \n if (has_edge_out_content_null)\n errors.push(['decision node ', node_decision, ' has atleast one outgoing edge with no content']);\n \n Object.entries(content_edges_out).forEach(([content, amount]) => {\n \n if (amount > 1) {\n const edges = node_edges_out.filter(edge => edge.gd.content = content);\n const error_start: validationErrorPart[] = [\n `the decision node `, \n node_decision, \n ` has multiple edges with content '${ edges[0].gd.content }' on the edges: `,\n ];\n edges.forEach((tmp_edge, i) => {\n error_start.push(tmp_edge)\n if (i < (edges.length - 1))\n error_start.push(', ')\n })\n\n errors.push(error_start)\n }\n });\n }\n\n // only perform cycle check if no other errors are present\n if (errors.length === 0) {\n \n // Cycle detection algorithm: https://en.wikipedia.org/wiki/Topological_sorting#Kahn's_algorithm\n\n const L = [];\n const S = graph.nodes.filter(x => x.get_edges_in().length === 0);\n\n let edges = [...graph.edges]\n // console.log(edges);\n\n while (S.length > 0) {\n const n = S.pop()!;\n L.push(n);\n\n for (const e of edges.filter(x => x.node_from_id == n.id)) {\n const m = e.get_node_to();\n\n edges = edges.filter(x => !(x.id==e.id)) // remove e from edges\n if (edges.filter(x => x.node_to_id == m.id).length === 0)\n S.push(m)\n }\n }\n\n if (edges.length > 0) {\n errors.push(['graph must not contain cycles/loops'])\n }\n }\n\n return errors;\n }\n \n da_node_get_id(node: Node): string {\n // return `${ node.type }_${ node.variable }`\n // console.log(node, `${ node.gd.type }_${node.id.toString().substring(0, 8)}`)\n return node.gd.variable ?? `${ node.gd.type }_${node.id.toString().substring(0, 8)}`;\n }\n\n /**\n * Construct python code block for docassemble, from given graph and node\n * Performs recursive preorder depth-first search\n * @param node The root node to start traversal from\n * @param indent To indent this code relative to indent of current node\n * @returns string[] lines of code\n */\n da_build_logic(graph: Graph, node: Node): string[] {\n\n const node_edges_out = node.get_edges_out();\n \n const code: string[] = [];\n\n switch(node.gd.type) {\n case 'start': {\n\n code.push(`def get_outcome_${ this.da_node_get_id(node) }():`)\n code.push(...indent([ this.da_node_get_id(node) ]))\n \n const sub_cont: string[] = []\n for(const node_edge_out of node_edges_out)\n sub_cont.push(...this.da_build_logic(graph, node_edge_out.get_node_to()))\n \n if (sub_cont.length > 0)\n code.push(...indent(sub_cont))\n else\n code.push(...indent(['pass']));\n \n code.push(`outcome = get_outcome_${ this.da_node_get_id(node) }()`)\n\n break\n\n }\n case 'end':\n code.push(`return ${ this.da_node_get_id(node) }`);\n\n break\n case 'decision': {\n\n for(const node_edge_out of node_edges_out) { \n const node_edge_out_content = node_edge_out.gd.content;\n if (node_edge_out_content == null)\n continue\n\n const sub_node = this.da_build_logic(graph, node_edge_out.get_node_to())\n\n code.push(`if ${ this.da_node_get_id(node) } == '${ node_edge_out.gd.content }':`);\n code.push(...indent(sub_node || ['pass'], 1))\n }\n \n break\n }\n case 'notice': {\n code.push(`${ this.da_node_get_id(node) }`);\n\n for(const node_edge_out of node_edges_out) \n code.push(...this.da_build_logic(graph, node_edge_out.get_node_to()));\n \n break\n }\n }\n\n return code\n }\n\n /**\n * Generate the docassemble interview configuration content\n * @param graph Graph object satisfying the contract in utils/graph.ts\n * and has been verified according to the validate_graph() \n * @returns string docassemble interview code\n */\n out(graph: Graph): string {\n\n const node_start = graph.get_nodes_by_type('start')[0];\n const nodes_end = graph.get_nodes_by_type('end');\n\n const blocks: Array = [];\n \n for (const node of graph.nodes) {\n\n switch(node.gd.type) {\n case 'start':\n blocks.push([\n 'question: Start',\n `subquestion: '${ node.get_content() }'`,\n `continue button field: ${ this.da_node_get_id(node) }`,\n ]);\n\n break\n case 'end':\n break\n case 'decision': {\n \n const edges_out = graph.edges\n .filter(edge => edge.node_from_id == node.id);\n \n let buttons: Array = [];\n\n for (const edge_out of edges_out) {\n if (edge_out.gd.content != null)\n buttons.push(` - \"${ edge_out.gd.content }\"`)\n }\n\n // TODO: add option for priority of buttons (instead of sort)\n buttons.sort()\n\n if (buttons.length > 0)\n buttons = ['buttons:', ...buttons]\n\n blocks.push([\n 'question: Question',\n `subquestion: '${ node.get_content() }'`,\n `field: ${ this.da_node_get_id(node) }`,\n ...buttons\n ]);\n\n break\n }\n case 'notice': {\n blocks.push([\n 'question: Notice',\n `subquestion: '${ node.get_content() }'`,\n `continue button field: ${ this.da_node_get_id(node) }`,\n ]);\n\n break\n }\n }\n }\n \n const logic_code: string[] = [];\n for (const node_end of nodes_end ?? [])\n // adding declarations to end nodes content\n logic_code.push(...indent([`${this.da_node_get_id(node_end)} = '${node_end.get_content()}'`]))\n\n logic_code.push(...indent(this.da_build_logic(graph, node_start)));\n\n if (logic_code.length > 0)\n blocks.push(['code: |', ...logic_code])\n\n blocks.push([\n 'mandatory: True',\n 'question: End',\n 'subquestion: ${outcome}'\n ]);\n \n let content = blocks.map((block) => {\n if (typeof block == \"string\")\n return block;\n else if(Array.isArray(block))\n return block.join(\"\\n\");\n }).join(\"\\n---\\n\")\n \n return content;\n }\n}","import Graph from \"../graph\";\nimport { Graph as AntvGraph } from \"@antv/x6\";\nimport { AntvNodeData, default_edge_attrs, default_edge_label, default_node_ports, node_types, node_type_default } from \"../antv-model\";\nimport { ITransformer } from \".\";\nimport { uuid } from \"../data/uuid\";\n\nexport class AntvisTransformer implements ITransformer {\n\n\n // inspired from: https://github.com/eensander/graph-quiz/blob/master/resources/js/components/dashboard/graph/GraphModeler.vue#L442\n in(graph: Graph, antv_graph: AntvGraph): Graph {\n graph.clear();\n\n const local_data = {\n 'nodes': antv_graph.getNodes(),\n 'edges': antv_graph.getEdges(),\n };\n \n for(const loc_node of local_data.nodes) {\n const loc_node_data = loc_node.getData() as AntvNodeData\n const rem_node = {\n id: loc_node.id,\n gd: loc_node_data.gd,\n\n appearance: {\n x: loc_node.getPosition().x ?? 0,\n y: loc_node.getPosition().y ?? 0,\n width: loc_node.getSize().width\n ?? node_types[loc_node_data.gd.type].antv_metadata.width,\n height: loc_node.getSize().height \n ?? node_types[loc_node_data.gd.type].antv_metadata.height,\n }\n }\n \n graph.add_node(rem_node)\n }\n \n for(const loc_edge of local_data['edges']) {\n // console.log(\"loc_edge\", loc_edge);\n\n // both source and target ought to be known (non null)\n if (loc_edge.getSourceCell() == null || loc_edge.getTargetCell() == null)\n continue\n\n let edge_content = loc_edge.getLabelAt(0)?.attrs?.text?.text?.toString() ?? null;\n if (edge_content == \"\")\n edge_content = null;\n\n const rem_edge = {\n id: loc_edge.id,\n \n node_from_id: loc_edge.getSourceCellId(),\n node_to_id: loc_edge.getTargetCellId(),\n\n gd: {\n content: edge_content,\n },\n \n appearance: {\n vertices: loc_edge.getVertices(),\n },\n }\n\n graph.add_edge(rem_edge)\n }\n\n return graph;\n }\n\n // inspired from: https://github.com/eensander/graph-quiz/blob/master/resources/js/components/dashboard/graph/GraphModeler.vue#L525\n out(graph: Graph) {\n\n const data_nodes: Array = [];\n let last_x = 0;\n \n Object.values(graph.nodes).forEach((node) => {\n\n let node_ser = {\n // default values (includes ports etc); can be overwritten after spread\n ...node_types[node.gd.type].antv_metadata,\n\n // id: `node-${node.id}`,\n id: node.id,\n\n x: node.appearance?.x ?? (last_x += 50),\n y: node.appearance?.y ?? 50,\n\n data: {\n gd: node.gd\n },\n }\n\n // https://stackoverflow.com/a/58245240\n node_ser = Object.assign(\n {},\n node_types[node.gd.type].antv_metadata ?? node_types.notice.antv_metadata ?? {},\n node_ser,\n );\n\n // because there are defaults\n /*\n if (node_ser.width == null && node.appearance?.width != null)\n node_ser.width = node.appearance.width;\n if (node_ser.height == null && node.appearance?.height != null)\n node_ser.height = node.appearance.height;\n */\n \n data_nodes.push(node_ser);\n })\n \n const data_edges: Array = [];\n\n Object.values(graph.edges).forEach((edge) => {\n const edge_label = default_edge_label(edge.gd.content);\n\n const edge_ser = {\n ...default_edge_attrs,\n\n // id: `edge-${edge.id}`,\n id: edge.id,\n\n labels: edge_label != null ? [ edge_label ] : [],\n\n source: {\n // cell: `node-${edge.node_from_id}`,\n cell: edge.node_from_id,\n port: 'out-1'\n },\n target: {\n // cell: `node-${edge.node_to_id}`,\n cell: edge.node_to_id,\n port: 'in-1'\n },\n\n data: {\n // edge_id: edge.id,\n gd: edge.gd\n },\n\n }\n\n data_edges.push(edge_ser)\n })\n\n\n const data = {\n nodes: data_nodes,\n edges: data_edges,\n }\n\n // this.graph.fromJSON(data);\n\n return data;\n }\n}","// from: https://stackoverflow.com/a/47232883/17864167 (2022-04-22)\nexport function pick(obj: T, ...keys: K[]): Pick {\n const ret: any = {};\n keys.forEach(key => {\n ret[key] = obj[key];\n })\n return ret;\n}","import { pick } from \"@/utils/data/pick\";\nimport Graph, { Edge, Node } from \"@/utils/graph\";\n\n// export type JSONGraphData = Partial & Pick\n// export type JSONGraphData = Partial & Pick & {\nexport type JSONGraphData = {\n 'nodes': Array & Pick>,\n 'edges': Array & Pick>,\n 'name': string\n}\n\nexport class JSONTransformer {\n \n in_json(graph: Graph, data: JSONGraphData) {\n graph.clear();\n\n graph.name = data.name;\n for (const node of data.nodes) {\n graph.add_node(node)\n }\n for (const edge of data.edges) {\n graph.add_edge(edge)\n }\n \n return graph;\n }\n\n out_json(graph: Graph) {\n \n const data = {\n 'nodes': graph.nodes.map(node => pick(node, 'id', 'appearance', 'gd')),\n 'edges': graph.edges.map(edge => pick(edge, 'id', 'node_from_id', 'node_to_id', 'gd')),\n 'name': graph.name\n }\n\n return data;\n }\n\n}","import { Graph as AntvGraph } from \"@antv/x6\";\nimport { default as Graph, } from \"../graph\";\nimport { DocassembleTransformer } from \"./docassemble\";\nimport { AntvisTransformer } from \"./antvis\";\nimport { JSONGraphData, JSONTransformer } from \"./json\";\n\nexport interface ITransformer {\n in?: (graph: Graph, ...params: Array) => Graph\n out: (graph: Graph, ...params: Array) => any\n}\n\nexport default class {\n\n graph: Graph;\n json: JSONTransformer;\n antvis: AntvisTransformer;\n docassemble: DocassembleTransformer;\n\n \n constructor(graph?: Graph) {\n this.graph = graph ?? new Graph();\n\n this.json = new JSONTransformer()\n this.antvis = new AntvisTransformer()\n this.docassemble = new DocassembleTransformer()\n }\n\n // json\n\n in_json(data: JSONGraphData) {\n this.graph = this.json.in_json(this.graph, data);\n\n return this;\n }\n\n out_json() {\n return this.json.out_json(this.graph);\n }\n\n // antv\n\n in_antv(antv_graph: AntvGraph) {\n this.graph = this.antvis.in(this.graph, antv_graph)\n\n return this;\n }\n\n out_antv() {\n return this.antvis.out(this.graph)\n }\n\n // docassemble\n \n out_docassemble() {\n return this.docassemble.out(this.graph)\n }\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"toolbar\" }\nconst _hoisted_2 = { class: \"toolbar-item\" }\nconst _hoisted_3 = [\"disabled\"]\nconst _hoisted_4 = { class: \"toolbar-item\" }\nconst _hoisted_5 = [\"disabled\"]\nconst _hoisted_6 = { class: \"toolbar-item\" }\nconst _hoisted_7 = [\"disabled\"]\nconst _hoisted_8 = { class: \"toolbar-item\" }\nconst _hoisted_9 = [\"disabled\"]\nconst _hoisted_10 = { class: \"toolbar-item\" }\nconst _hoisted_11 = [\"disabled\"]\n\nimport { Dom, Addon, Graph } from '@antv/x6';\n import Transformer from '@/utils/transformer'\n import { JSONGraphData } from '@/utils/transformer/json';\n import { useToast } from 'vue-toastification';\n\n \nexport default /*#__PURE__*/_defineComponent({\n props: {\n graph: {\n type: Graph,\n },\n docassemble_cont_update: {\n type: Function,\n },\n init_modeler: {\n type: Function,\n }\n },\n setup(__props) {\n\nconst props = __props\n\n // https://github.com/antvis/X6/blob/master/sites/x6-sites-demos/packages/tutorial/basic/dnd/dnd/src/app.tsx\n\n const toast = useToast();\n\n const { Dnd } = Addon;\n\n \n\n const item_regenerate_docassemble = () => {\n props.docassemble_cont_update!()\n }\n \n\n const item_load_example = () => {\n // props.docassemble_cont_update!()\n if (confirm(\"Are you sure you want to load the example flowchart?\")) {\n const json: JSONGraphData = {\"nodes\":[{\"id\":\"9ed5d853-62a0-4395-afb9-d94e8cffd2cd\",\"appearance\":{\"x\":270,\"y\":40,\"width\":180,\"height\":36},\"gd\":{\"type\":\"start\",\"content\":\"walk or bus?\",\"variable\":\"walk_or_bus\"}},{\"id\":\"b8bdd58d-ab1f-44d0-82b8-5edb21f3d484\",\"appearance\":{\"x\":270,\"y\":110,\"width\":180,\"height\":36},\"gd\":{\"type\":\"decision\",\"content\":\"is it raining?\",\"variable\":\"is_raining\"}},{\"id\":\"396a3b5e-a0cd-49c4-96c3-c65a8da0c483\",\"appearance\":{\"x\":90,\"y\":190,\"width\":180,\"height\":36},\"gd\":{\"type\":\"notice\",\"content\":\"take an umbrella\",\"variable\":\"notice_take_umbrella\"}},{\"id\":\"d9a60522-cc80-40bf-b691-5e51b27b0e6c\",\"appearance\":{\"x\":90,\"y\":260,\"width\":180,\"height\":36},\"gd\":{\"type\":\"end\",\"content\":\"take the bus\",\"variable\":\"end_bus\"}},{\"id\":\"20e3d21e-0799-4de7-8d1e-6cac260279ad\",\"appearance\":{\"x\":470,\"y\":260,\"width\":180,\"height\":36},\"gd\":{\"type\":\"end\",\"content\":\"take a walk\",\"variable\":\"end_walk\"}}],\"edges\":[{\"id\":\"5106836e-d49c-4d33-9ed4-c6b5048ee11f\",\"node_from_id\":\"b8bdd58d-ab1f-44d0-82b8-5edb21f3d484\",\"node_to_id\":\"396a3b5e-a0cd-49c4-96c3-c65a8da0c483\",\"gd\":{\"content\":\"Yes\"}},{\"id\":\"b81563a8-ad65-4d7e-86df-efbb0cf7fad4\",\"node_from_id\":\"b8bdd58d-ab1f-44d0-82b8-5edb21f3d484\",\"node_to_id\":\"20e3d21e-0799-4de7-8d1e-6cac260279ad\",\"gd\":{\"content\":\"No\"}},{\"id\":\"3008df09-bacb-4a33-9b3e-8e248e858c2b\",\"node_from_id\":\"396a3b5e-a0cd-49c4-96c3-c65a8da0c483\",\"node_to_id\":\"d9a60522-cc80-40bf-b691-5e51b27b0e6c\",\"gd\":{\"content\":null}},{\"id\":\"90c865d8-fbc3-4b7b-b0a3-46a8f1468c3e\",\"node_from_id\":\"9ed5d853-62a0-4395-afb9-d94e8cffd2cd\",\"node_to_id\":\"b8bdd58d-ab1f-44d0-82b8-5edb21f3d484\",\"gd\":{\"content\":null}}],\"name\":\"Untitled graph\"};\n const antv = (new Transformer()).in_json(json).out_antv();\n props.graph?.fromJSON(antv);\n props.docassemble_cont_update!();\n }\n }\n\n const item_import_custom_json = () => {\n // props.docassemble_cont_update!()\n const custom_json = prompt(\"Enter the JSON you wish to import\")\n if (custom_json) {\n const custom_json_parsed = JSON.parse(custom_json);\n if (custom_json_parsed) {\n const antv = (new Transformer()).in_json(custom_json_parsed).out_antv();\n props.graph?.fromJSON(antv);\n props.docassemble_cont_update!();\n } else {\n toast.error(\"Failed to parse import\")\n }\n }\n }\n \n const item_use = () => {\n // window.open(route('graph.show', [this.remote_graph_data.graph.id]), '_blank');\n }\n \n const item_reload = () => {\n // props.remote_graph_data_reload()\n }\n\n const item_save = () => {\n // props.local_save()\n }\n \n const item_undo = () => {\n props.graph?.undo();\n }\n \n const item_redo = () => {\n props.graph?.redo();\n }\n\n const item_clear = () => {\n // if (typeof props.init_modeler !== \"undefined\" && confirm(\"Are you sure you want to reset your workspace?\")){\n // props.init_modeler();\n // }\n\n if (confirm(\"Are you sure you want to reset your workspace?\")) {\n props.graph?.removeCells(props.graph.getCells()); \n // TODO: set view to original state\n }\n }\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"button\", {\n disabled: typeof __props.graph === 'undefined',\n onClick: _cache[0] || (_cache[0] = ($event: any) => (item_undo()))\n }, \"Undo\", 8, _hoisted_3)\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"button\", {\n disabled: typeof __props.graph === 'undefined',\n onClick: _cache[1] || (_cache[1] = ($event: any) => (item_redo()))\n }, \"Redo\", 8, _hoisted_5)\n ]),\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"button\", {\n disabled: typeof __props.graph === 'undefined',\n onClick: _cache[2] || (_cache[2] = ($event: any) => (item_clear()))\n }, \"Clear\", 8, _hoisted_7)\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"button\", {\n class: \"bg-blue-200\",\n disabled: typeof __props.graph === 'undefined',\n onClick: _cache[3] || (_cache[3] = ($event: any) => (item_import_custom_json()))\n }, \"Import JSON\", 8, _hoisted_9)\n ]),\n _createElementVNode(\"div\", _hoisted_10, [\n _createElementVNode(\"button\", {\n class: \"bg-blue-200\",\n disabled: typeof __props.graph === 'undefined',\n onClick: _cache[4] || (_cache[4] = ($event: any) => (item_load_example()))\n }, \"Load default example\", 8, _hoisted_11)\n ])\n ]))\n}\n}\n\n})","import script from \"./GraphModelerToolbar.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GraphModelerToolbar.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./GraphModelerToolbar.vue?vue&type=style&index=0&id=495a6c46&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveDynamicComponent as _resolveDynamicComponent, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"block font-medium mb-2\" }, \"Validation errors\", -1)\nconst _hoisted_2 = { class: \"list-disc list-inside\" }\nconst _hoisted_3 = {\n key: 1,\n class: \"block text-green-800\"\n}\n\nimport { VNode } from 'vue';\n \n \nexport default /*#__PURE__*/_defineComponent({\n props: {\n formatted_validation_errors: null\n },\n setup(__props: any) {\n\nconst props = __props as {formatted_validation_errors: (string | VNode)[][]}\n\n\n \n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"border border-gray-500 rounded mt-4 mb-2 py-2 px-3\", { 'bg-red-50': props.formatted_validation_errors.length > 0 }])\n }, [\n (props.formatted_validation_errors.length > 0)\n ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [\n _hoisted_1,\n _createElementVNode(\"ul\", _hoisted_2, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(props.formatted_validation_errors, (validation_error, vei) => {\n return (_openBlock(), _createElementBlock(\"li\", {\n class: \"validation-error text-red-900\",\n key: vei\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(validation_error, (err_part) => {\n return (_openBlock(), _createElementBlock(_Fragment, { key: err_part }, [\n ((err_part as any).__v_isVNode ?? false)\n ? (_openBlock(), _createBlock(_resolveDynamicComponent(err_part), { key: 0 }))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _createTextVNode(_toDisplayString(err_part), 1)\n ], 64))\n ], 64))\n }), 128))\n ]))\n }), 128))\n ])\n ], 64))\n : (_openBlock(), _createElementBlock(\"span\", _hoisted_3, \"Graph contains no errors\"))\n ], 2))\n}\n}\n\n})","import script from \"./GraphValidationErrors.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GraphValidationErrors.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./GraphValidationErrors.vue?vue&type=style&index=0&id=0dba82ff&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createBlock as _createBlock, unref as _unref, vModelCheckbox as _vModelCheckbox, withDirectives as _withDirectives, createTextVNode as _createTextVNode, Fragment as _Fragment } from \"vue\"\n\nconst _hoisted_1 = { class: \"mb-4\" }\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"h1\", { class: \"text-4xl font-serif inline\" }, \"GraphDoc\", -1)\nconst _hoisted_3 = {\n key: 0,\n class: \"text-sm\"\n}\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"p\", { class: \"mt-2\" }, \" This tool serves as a PoC to convert flowcharts (which can be represented as directed acyclic graphs) to docassemble interviews. The goal of this tool is to provide an intuitive interface for constructing docassemble interviews, in which relations and dependencies between nodes ('blocks') are more clearly visible. \", -1)\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"h2\", { class: \"text-lg font-serif mt-2 mb-1\" }, \"Instructions\", -1)\nconst _hoisted_6 = /*#__PURE__*/_createElementVNode(\"p\", null, \" Start by dragging nodes from the left sidebar. Connect nodes by dragging edges from and to the ports of the nodes. Configure nodes and edges by clicking on their cells and filling in the details in the config sidebar on the right. Nodes and edges can also be removed from this sidebar. If no output is produced, interpret the validation errors presented above the docassemble output window. For an example of a well structured graph, click on 'Load example'. \", -1)\nconst _hoisted_7 = [\n _hoisted_4,\n _hoisted_5,\n _hoisted_6\n]\nconst _hoisted_8 = { class: \"border border-gray-400 rounded overflow-hidden\" }\nconst _hoisted_9 = { class: \"w-full bg-gray-100\" }\nconst _hoisted_10 = {\n class: \"w-full flex\",\n style: {\"height\":\"500px\"}\n}\nconst _hoisted_11 = { class: \"w-20 flex-initial bg-gray-100 border-t border-gray-200\" }\nconst _hoisted_12 = /*#__PURE__*/_createElementVNode(\"div\", {\n id: \"modeler-container-box\",\n class: \"flex flex-grow border-4 border-b-0 border-gray-300\"\n}, [\n /*#__PURE__*/_createElementVNode(\"div\", {\n id: \"modeler-container\",\n style: {\"flex\":\"1\"}\n })\n], -1)\nconst _hoisted_13 = { class: \"w-64 flex-initial bg-gray-100 border-t border-gray-200 overflow-y-auto\" }\nconst _hoisted_14 = { class: \"my-4\" }\nconst _hoisted_15 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"text-lg block mb-1\" }, \"Docassemble interview output\", -1)\nconst _hoisted_16 = { class: \"text-sm text-gray-700\" }\nconst _hoisted_17 = /*#__PURE__*/_createTextVNode(\" Include a copy of the model \")\nconst _hoisted_18 = { class: \"relative\" }\nconst _hoisted_19 = {\n class: \"w-full min-h-4 font-mono border rounded p-2 mt-1 whitespace-pre-wrap\",\n id: \"docassemble_out_container\"\n}\n\nimport { h, onMounted, reactive, Ref, ref, VNode, watch } from 'vue';\n\n import { useToast } from \"vue-toastification\";\n \n import { Cell, Graph } from '@antv/x6';\n\n import GraphModelerConfigBar from './GraphModelerConfigBar.vue'\n import GraphModelerElementsBar from './GraphModelerElementsBar.vue'\n import GraphModelerToolbar from './GraphModelerToolbar.vue'\n import GraphValidationErrors from './GraphValidationErrors.vue'\n \n import Transformer from '@/utils/transformer'\n import { graph_options_defaults, graph_register_defaults } from '@/utils/antv-model'\n import { DocassembleTransformer, validationErrorList } from '@/utils/transformer/docassemble';\n import { Node, Edge } from '@/utils/graph';\n\n \nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\n\n const read_more = ref(false);\n\n onMounted(() => {\n init_modeler()\n docassemble_cont_update()\n })\n\n const graph_data: Ref = ref({});\n const graph: Ref = ref();\n\n const selected_cell: Ref = ref();\n function select_cell(cell: Cell | undefined) {\n if (typeof cell !== 'undefined') {\n selected_cell.value = cell;\n graph.value?.select(cell);\n graph.value?.scrollToCell(cell);\n }\n }\n\n const docassemble_validation_errors: Ref = ref([]);\n const formatted_validation_errors: Ref<(string | VNode)[][]> = ref([]);\n const docassemble_cont: Ref = ref('');\n\n const docassemble_out_options = reactive({\n include_json_export: true,\n });\n\n watch(() => docassemble_out_options, (val => {\n console.log(\"options updated\")\n docassemble_cont_update();\n }), { deep: true })\n\n const docassemble_cont_update = () => {\n if (typeof graph.value == \"undefined\")\n return;\n \n const transformer = (new Transformer()).in_antv(graph.value);\n\n docassemble_validation_errors.value = (new DocassembleTransformer()).validate_graph(transformer.graph);\n\n // remove cells from all errors\n graph.value.getCells().forEach(cell => \n typeof cell.getData()?.errors !== 'undefined' &&\n cell.setData({'errors': false}, {no_da_update: true}));\n \n // this part formats the conversion errors, which contain Node and Edge \n // objects, to a clickable span as a VNode\n formatted_validation_errors.value = docassemble_validation_errors.value.map((val_error) => {\n return val_error.map(error_part => {\n if (typeof error_part === \"string\") {\n return error_part;\n } else if (error_part.is_node()) {\n const error_node = (error_part as Node);\n const antv_node = graph.value?.getCellById(error_node.id);\n if (typeof antv_node !== 'undefined') {\n antv_node.setData({errors: true}, {no_da_update: true});\n return h('span', {\n onClick(event: any) {\n select_cell(antv_node);\n },\n class: 'clickable-entity'\n }, error_node.get_label());\n } else {\n return `\"${ error_node.get_label() }\"\"`\n }\n } else if (error_part.is_edge()) {\n const error_edge = (error_part as Edge);\n const antv_edge = graph.value?.getCellById(error_edge.id);\n const error_edge_content = error_edge.gd.content ? \n `with content ${error_edge.gd.content}` : \n `leaving from node ${ error_edge.get_node_from().get_label() }`;\n if (typeof antv_edge !== 'undefined') {\n return h('span', {\n onClick(event: any) {\n select_cell(graph.value?.getCellById(error_edge.gd.content ? error_edge.id : error_edge.node_from_id));\n },\n class: 'clickable-entity'\n }, error_edge_content);\n } else {\n return `\"${ error_edge_content }\"`\n }\n } else {\n return ''\n }\n });\n });\n\n if(formatted_validation_errors.value.length == 0) {\n docassemble_cont.value = transformer.out_docassemble()\n if (docassemble_cont.value && docassemble_out_options.include_json_export) {\n docassemble_cont.value = docassemble_cont.value\n .concat(\"\\n---\\n# [START INLINE GRAPHDOC EXPORT]\")\n .concat(\"\\n# \").concat(JSON.stringify(transformer.out_json()))\n .concat(\"\\n# [END INLINE GRAPHDOC EXPORT]\");\n }\n } else {\n docassemble_cont.value = '-';\n }\n };\n\n const copy_button_content = ref('COPY');\n const copy_docassemble_out = () => {\n \n (window as any).getSelection().selectAllChildren(\n document.getElementById('docassemble_out_container')\n );\n\n // source: https://stackoverflow.com/a/67008779/17864167\n navigator.clipboard.writeText(docassemble_cont.value)\n .then(() => {\n copy_button_content.value = 'COPIED!';\n setTimeout(() => { copy_button_content.value = 'COPY' }, 1200)\n })\n .catch(err => {\n copy_button_content.value = 'FAILED';\n setTimeout(() => { copy_button_content.value = 'COPY' }, 1200)\n console.log('Failed to copy', err);\n });\n }\n\n const register_events = (graph: Graph) => {\n // https://x6.antv.vision/en/docs/tutorial/intermediate/events\n\n graph.on('cell:change:*', (args) => {\n // console.log(args)\n if (!(args.options.no_da_update ?? false)) {\n if (args.key == 'target') {\n // when target hits, it changes from {x: n, y: n} to Cell, which we will catch here.\n if (typeof args.current.cell != typeof args.previous.cell)\n docassemble_cont_update()\n\n // other changes to ignore:\n } else if (!['target', 'zIndex', 'tools', 'position'].includes(args.key as string))\n docassemble_cont_update()\n }\n })\n\n graph.on('cell:removed', docassemble_cont_update)\n graph.on('cell:added', docassemble_cont_update)\n\n graph.on('cell:selected', ({ cell, options }) => {\n if (selected_cell.value != cell)\n selected_cell.value = cell\n })\n\n graph.on('cell:unselected', ({ cell, options }) => {\n if (selected_cell.value != null)\n selected_cell.value = undefined\n })\n\n graph.on('blank:click', ({ e, x, y }) => {\n if (selected_cell.value != null)\n selected_cell.value = undefined\n })\n }\n\n const init_modeler = () => {\n\n let container = document.getElementById('modeler-container')!;\n // let container_box = document.getElementById('modeler-container-box')!;\n\n let width = container.scrollWidth;\n let height = container.scrollHeight || 500;\n\n graph.value = new Graph({\n ...graph_options_defaults,\n\n container: container,\n autoResize: true,\n\n // width,\n // height,\n })\n\n if(graph.value != undefined)\n {\n graph_register_defaults(graph.value);\n register_events(graph.value);\n\n docassemble_cont_update()\n }\n\n };\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"span\", null, [\n _hoisted_2,\n _createElementVNode(\"button\", {\n onClick: _cache[0] || (_cache[0] = ($event: any) => (read_more.value = !read_more.value)),\n class: \"font-normal underline-offset-4 underline hover:no-underline pl-6 py-1 px-2 text-gray-600 hover:text-gray-900\"\n }, \"read \" + _toDisplayString(read_more.value ? 'less' : 'more'), 1)\n ]),\n (read_more.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, _hoisted_7))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"div\", _hoisted_9, [\n _createVNode(GraphModelerToolbar, {\n graph: graph.value,\n docassemble_cont_update: docassemble_cont_update,\n init_modeler: init_modeler\n }, null, 8, [\"graph\"])\n ]),\n _createElementVNode(\"div\", _hoisted_10, [\n _createElementVNode(\"div\", _hoisted_11, [\n (graph.value !== null)\n ? (_openBlock(), _createBlock(GraphModelerElementsBar, {\n key: 0,\n graph: graph.value\n }, null, 8, [\"graph\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _hoisted_12,\n _createElementVNode(\"div\", _hoisted_13, [\n _createVNode(GraphModelerConfigBar, { cell: selected_cell.value }, null, 8, [\"cell\"])\n ])\n ])\n ]),\n _createVNode(GraphValidationErrors, { formatted_validation_errors: formatted_validation_errors.value }, null, 8, [\"formatted_validation_errors\"]),\n _createElementVNode(\"div\", _hoisted_14, [\n _hoisted_15,\n _createElementVNode(\"label\", _hoisted_16, [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"checkbox\",\n class: \"mr-1\",\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((_unref(docassemble_out_options).include_json_export) = $event))\n }, null, 512), [\n [_vModelCheckbox, _unref(docassemble_out_options).include_json_export]\n ]),\n _hoisted_17\n ]),\n _createElementVNode(\"div\", _hoisted_18, [\n _createElementVNode(\"div\", _hoisted_19, _toDisplayString(docassemble_cont.value), 1),\n _createElementVNode(\"span\", {\n class: \"copy-button\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (copy_docassemble_out()))\n }, _toDisplayString(copy_button_content.value), 1)\n ])\n ])\n ], 64))\n}\n}\n\n})","import script from \"./GraphModeler.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GraphModeler.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./GraphModeler.vue?vue&type=style&index=0&id=94291258&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"mb-8 mt-4 mx-auto max-w-6xl\" }\n\nimport { onMounted } from 'vue'\n\n import GraphModeler from './GraphModeler.vue'\n\n \nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\n\n onMounted(() => {\n console.log('Editor window mounted.')\n });\n \n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(GraphModeler)\n ]))\n}\n}\n\n})","import script from \"./GraphEditorComponent.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./GraphEditorComponent.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"\" }\n\nimport { defineComponent } from 'vue';\n// import GraphModeler from './components/GraphModeler.vue';\nimport GraphEditorComponent from './components/graph/GraphEditorComponent.vue';\nimport Test from './components/Test.vue';\n\nexport default /*#__PURE__*/_defineComponent({\n setup(__props) {\n\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(GraphEditorComponent)\n ]))\n}\n}\n\n})","import script from \"./App.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./App.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./App.vue?vue&type=style&index=0&id=62820c9f&lang=scss\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { createApp } from 'vue'\nimport App from './App.vue'\n\nimport './style/index.scss'\n\ncreateApp(App).mount('#app')\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkGraphDoc\"] = self[\"webpackChunkGraphDoc\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(977); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["uuid","uuidv4","NodeDefault","appearance","x","y","width","height","gd","type","content","variable","Node","constructor","options","id","Object","assign","this","is_node","is_edge","get_label","substring","get_content","get_edges_in","graph","edges","filter","edge","node_to_id","get_edges_out","node_from_id","get_nodes_in","node_ids","map","nodes","node","includes","get_nodes_out","EdgeDefault","Edge","get_node_from","get_node_to","Graph","name","get_nodes_by_type","add_node","push","add_edge","clear","default_edge_label","text","attrs","position","distance","default_edge_attrs","line","strokeWidth","zIndex","graph_options_defaults","grid","background","color","mousewheel","enabled","zoomAtMousePosition","modifiers","minScale","maxScale","scroller","pannable","connecting","allowBlank","allowMulti","allowLoop","allowEdge","allowNode","allowPort","highlight","snap","connector","connectionPoint","anchor","validateMagnet","e","magnet","view","cell","getAttribute","createEdge","validateEdge","previous","validateConnection","sourceMagnet","targetMagnet","history","beforeAddCommand","event","args","key","resizing","selecting","multiple","graph_register_defaults","on","addTools","setTimeout","removeTool","s","offset","deltaY","Math","abs","control","floor","v1","v2","Path","default_port_groups","in","circle","r","stroke","out","default_node_ports","ports","default_ports","groups","items","port_group","group","node_type_default","node_html","render","data","getData","label","label_class","errors","shouldComponentUpdate","hasChanged","node_types","start","antv_metadata","shape","html","config_fields","general","additional","decision","notice","end","str","toUpperCase","slice","toLowerCase","_hoisted_1","_hoisted_2","_createElementVNode","class","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_defineComponent","props","setup","__props","current_fields","computed","field","node_type","current_node_fields","keys","fromEntries","entries","val","length","node_content","get","set","value","setData","node_variable","edge_content_ref","ref","edge_content","getLabelAt","toString","edge_label","removeLabelAt","setLabelAt","_ctx","_cache","_openBlock","_createElementBlock","isNode","_toDisplayString","_unref","titleCase","onClick","$event","remove","_Fragment","_renderList","fields","field_group","_withDirectives","_isRef","_vModelText","_createCommentVNode","style","isEdge","getSourceCell","__exports__","dnd","onMounted","watch","init_dnd","Addon","target","scaled","animation","validateNode","droppingNode","startDrag","currentTarget","createNode","node_type_name","_normalizeClass","onMousedown","indent","lines","spaces_per","repeat","concat","DocassembleTransformer","validate_graph","node_start","nodes_end","variable_list","node_var","da_node_get_id","amount","console","log","seperated_error_nodes","forEach","i","match","nodes_decision","node_decision","has_edge_out_content_null","content_edges_out","node_edges_out","edge_out","error_start","tmp_edge","L","S","n","pop","m","da_build_logic","code","sub_cont","node_edge_out","node_edge_out_content","sub_node","blocks","edges_out","buttons","sort","logic_code","node_end","block","Array","isArray","join","AntvisTransformer","antv_graph","local_data","getNodes","getEdges","loc_node","loc_node_data","rem_node","getPosition","getSize","loc_edge","getTargetCell","rem_edge","getSourceCellId","getTargetCellId","vertices","getVertices","data_nodes","last_x","values","node_ser","data_edges","edge_ser","labels","source","port","pick","obj","ret","JSONTransformer","in_json","out_json","json","antvis","docassemble","in_antv","out_antv","out_docassemble","docassemble_cont_update","Function","init_modeler","toast","useToast","Dnd","item_load_example","confirm","antv","Transformer","fromJSON","item_import_custom_json","custom_json","prompt","custom_json_parsed","JSON","parse","error","item_undo","undo","item_redo","redo","item_clear","removeCells","getCells","disabled","formatted_validation_errors","validation_error","vei","err_part","__v_isVNode","_createBlock","_resolveDynamicComponent","_createTextVNode","read_more","selected_cell","select_cell","select","scrollToCell","docassemble_validation_errors","docassemble_cont","docassemble_out_options","reactive","include_json_export","deep","transformer","no_da_update","val_error","error_part","error_node","antv_node","getCellById","h","error_edge","antv_edge","error_edge_content","stringify","copy_button_content","copy_docassemble_out","window","getSelection","selectAllChildren","document","getElementById","navigator","clipboard","writeText","then","catch","err","register_events","current","undefined","container","scrollWidth","scrollHeight","autoResize","_createVNode","GraphModelerToolbar","GraphModelerElementsBar","GraphModelerConfigBar","GraphValidationErrors","_vModelCheckbox","GraphModeler","GraphEditorComponent","createApp","App","mount","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","call","deferred","O","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","every","splice","getter","__esModule","d","a","definition","o","defineProperty","enumerable","g","globalThis","prop","prototype","hasOwnProperty","Symbol","toStringTag","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","self","bind","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/js/chunk-vendors.fc237368.js b/dist/js/chunk-vendors.fc237368.js new file mode 100644 index 0000000..88123c1 --- /dev/null +++ b/dist/js/chunk-vendors.fc237368.js @@ -0,0 +1,33 @@ +(self["webpackChunkGraphDoc"]=self["webpackChunkGraphDoc"]||[]).push([[998],{59:function(t,e,n){"use strict";n.d(e,{e9:function(){return y},kJ:function(){return hk},y$:function(){return sb}});var i={};n.r(i),n.d(i,{async:function(){return MC},block:function(){return mC},circle:function(){return OC},circlePlus:function(){return PC},classic:function(){return yC},cross:function(){return SC},diamond:function(){return CC},ellipse:function(){return DC},path:function(){return xC}});var s={};n.r(s),n.d(s,{annotations:function(){return nC},atConnectionLength:function(){return qC},atConnectionLengthIgnoreGradient:function(){return GC},atConnectionLengthKeepGradient:function(){return VC},atConnectionRatio:function(){return WC},atConnectionRatioIgnoreGradient:function(){return UC},atConnectionRatioKeepGradient:function(){return HC},connection:function(){return _C},displayEmpty:function(){return sC},eol:function(){return iC},fill:function(){return Xv},filter:function(){return dC},html:function(){return uC},lineHeight:function(){return Qv},port:function(){return pC},ref:function(){return vv},refCx:function(){return Tv},refCy:function(){return Dv},refD:function(){return Rv},refDKeepOffset:function(){return jv},refDResetOffset:function(){return Nv},refDx:function(){return xv},refDy:function(){return Ev},refHeight:function(){return Av},refHeight2:function(){return Vv},refPoints:function(){return $v},refPointsKeepOffset:function(){return Fv},refPointsResetOffset:function(){return Lv},refR:function(){return Bv},refRCircumscribed:function(){return Pv},refRInscribed:function(){return Ov},refRx:function(){return Mv},refRy:function(){return kv},refWidth:function(){return Sv},refWidth2:function(){return _v},refX:function(){return Cv},refX2:function(){return zv},refY:function(){return wv},refY2:function(){return Iv},resetOffset:function(){return lC},sourceMarker:function(){return FC},stroke:function(){return Yv},style:function(){return hC},targetMarker:function(){return BC},text:function(){return Jv},textPath:function(){return eC},textVerticalAnchor:function(){return tC},textWrap:function(){return Zv},title:function(){return rC},vertexMarker:function(){return RC},xAlign:function(){return oC},yAlign:function(){return aC}});var r={};n.r(r),n.d(r,{dot:function(){return JC},doubleMesh:function(){return QC},fixedDot:function(){return ZC},mesh:function(){return KC}});var o={};n.r(o),n.d(o,{blur:function(){return rw},brightness:function(){return dw},contrast:function(){return pw},dropShadow:function(){return ow},grayScale:function(){return aw},highlight:function(){return sw},hueRotate:function(){return hw},invert:function(){return uw},outline:function(){return iw},saturate:function(){return cw},sepia:function(){return lw}});var a={};n.r(a),n.d(a,{flipX:function(){return fw},flipXY:function(){return yw},flipY:function(){return mw},watermark:function(){return bw}});var l={};n.r(l),n.d(l,{className:function(){return Ew},opacity:function(){return Aw},stroke:function(){return kw}});var c={};n.r(c),n.d(c,{absolute:function(){return Nw},bottom:function(){return _w},ellipse:function(){return jw},ellipseSpread:function(){return Lw},left:function(){return $w},line:function(){return Rw},right:function(){return zw},top:function(){return Iw}});var h={};n.r(h),n.d(h,{bottom:function(){return Jw},inside:function(){return Qw},insideOriented:function(){return tx},left:function(){return Ww},manual:function(){return qw},outside:function(){return Zw},outsideOriented:function(){return Kw},radial:function(){return sx},radialOriented:function(){return rx},right:function(){return Xw},top:function(){return Yw}});var u={};n.r(u),n.d(u,{noop:function(){return Sx},pinAbsolute:function(){return Tx},pinRelative:function(){return Px}});var d={};n.r(d),n.d(d,{bottom:function(){return rE},bottomLeft:function(){return hE},bottomRight:function(){return uE},center:function(){return iE},left:function(){return oE},midSide:function(){return vE},nodeCenter:function(){return yE},orth:function(){return mE},right:function(){return aE},top:function(){return sE},topLeft:function(){return lE},topRight:function(){return cE}});var p={};n.r(p),n.d(p,{closest:function(){return SE},length:function(){return xE},orth:function(){return ME},ratio:function(){return wE}});var g={};n.r(g),n.d(g,{anchor:function(){return FE},bbox:function(){return DE},boundary:function(){return jE},rect:function(){return NE}});var f={};n.r(f),n.d(f,{er:function(){return ES},loop:function(){return AS},manhattan:function(){return CS},metro:function(){return xS},normal:function(){return RE},oneSide:function(){return $E},orth:function(){return UE}});var m={};n.r(m),n.d(m,{jumpover:function(){return GS},loop:function(){return OS},normal:function(){return kS},rounded:function(){return PS},smooth:function(){return TS}});var y={};n.r(y),n.d(y,{AutoSave:function(){return NA},Clipboard:function(){return uk},Dnd:function(){return vk},Halo:function(){return gk},Knob:function(){return WA},MiniMap:function(){return ZA},Scroller:function(){return lM},Selection:function(){return pM},Snapline:function(){return tM},Stencil:function(){return wk},Transform:function(){return gM}});var b=n(755),v=n.n(b);n(450);const C=navigator.userAgent;var w;if(function(t){t.IS_MAC=navigator.appVersion.indexOf("Mac")>0,t.IS_IOS=!!C.match(/(iPad|iPhone|iPod)/g),t.IS_WINDOWS=navigator.appVersion.indexOf("Win")>0,t.IS_IE=C.indexOf("MSIE")>=0,t.IS_IE11=!!C.match(/Trident\/7\./),t.IS_EDGE=!!C.match(/Edge\//),t.IS_NETSCAPE=C.indexOf("Mozilla/")>=0&&C.indexOf("MSIE")<0&&C.indexOf("Edge/")<0,t.IS_CHROME_APP=null!=window.chrome&&null!=window.chrome.app&&null!=window.chrome.app.runtime,t.IS_CHROME=C.indexOf("Chrome/")>=0&&C.indexOf("Edge/")<0,t.IS_OPERA=C.indexOf("Opera/")>=0||C.indexOf("OPR/")>=0,t.IS_FIREFOX=C.indexOf("Firefox/")>=0,t.IS_SAFARI=C.indexOf("AppleWebKit/")>=0&&C.indexOf("Chrome/")<0&&C.indexOf("Edge/")<0,t.SUPPORT_TOUCH="ontouchstart"in document.documentElement,t.SUPPORT_POINTER=null!=window.PointerEvent&&!t.IS_MAC,t.SUPPORT_PASSIVE=!1;try{const e=Object.defineProperty({},"passive",{get(){t.SUPPORT_PASSIVE=!0}}),n=document.createElement("div");n.addEventListener&&n.addEventListener("click",(()=>{}),e)}catch(e){}t.NO_FOREIGNOBJECT=!document.createElementNS||"[object SVGForeignObjectElement]"!==`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`||C.indexOf("Opera/")>=0,t.SUPPORT_FOREIGNOBJECT=!t.NO_FOREIGNOBJECT}(w||(w={})),function(t){function e(){const t=window.module;return null!=t&&null!=t.hot&&null!=t.hot.status?t.hot.status():"unkonwn"}function n(){return"apply"===e()}t.getHMRStatus=e,t.isApplyingHMR=n;const i={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function s(t){const e=document.createElement(i[t]||"div"),n=`on${t}`;let s=n in e;return s||(e.setAttribute(n,"return;"),s="function"===typeof e[n]),s}t.isEventSupported=s}(w||(w={})),w.SUPPORT_PASSIVE){v().event.special.touchstart={setup(t,e,n){if(!this.addEventListener)return!1;this.addEventListener("touchstart",n,{passive:!0})}};const t=v().event.special.mousewheel;if(t){const e=t.setup;t.setup=function(){const t=this.addEventListener;if(!t)return!1;this.addEventListener=(e,n)=>{t.call(this,e,n,{passive:!0})},e.call(this),this.addEventListener=t}}}window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),function(t){t.forEach((t=>{Object.prototype.hasOwnProperty.call(t,"append")||Object.defineProperty(t,"append",{configurable:!0,enumerable:!0,writable:!0,value(...t){const e=document.createDocumentFragment();t.forEach((t=>{const n=t instanceof Node;e.appendChild(n?t:document.createTextNode(String(t)))})),this.appendChild(e)}})}))}([Element.prototype,Document.prototype,DocumentFragment.prototype]);var x=Array.isArray,E=x,S="object"==typeof global&&global&&global.Object===Object&&global,A=S,M="object"==typeof self&&self&&self.Object===Object&&self,k=A||M||Function("return this")(),O=k,P=O.Symbol,T=P,D=Object.prototype,N=D.hasOwnProperty,j=D.toString,L=T?T.toStringTag:void 0;function F(t){var e=N.call(t,L),n=t[L];try{t[L]=void 0;var i=!0}catch(r){}var s=j.call(t);return i&&(e?t[L]=n:delete t[L]),s}var B=F,R=Object.prototype,$=R.toString;function z(t){return $.call(t)}var I=z,_="[object Null]",V="[object Undefined]",G=T?T.toStringTag:void 0;function H(t){return null==t?void 0===t?V:_:G&&G in Object(t)?B(t):I(t)}var U=H;function q(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var W=q,X="[object AsyncFunction]",Y="[object Function]",J="[object GeneratorFunction]",Z="[object Proxy]";function K(t){if(!W(t))return!1;var e=U(t);return e==Y||e==J||e==X||e==Z}var Q=K,tt=9007199254740991;function et(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=tt}var nt=et;function it(t){return null!=t&&nt(t.length)&&!Q(t)}var st=it,rt=O["__core-js_shared__"],ot=rt,at=function(){var t=/[^.]+$/.exec(ot&&ot.keys&&ot.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function lt(t){return!!at&&at in t}var ct=lt,ht=Function.prototype,ut=ht.toString;function dt(t){if(null!=t){try{return ut.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var pt=dt,gt=/[\\^$.*+?()[\]{}|]/g,ft=/^\[object .+?Constructor\]$/,mt=Function.prototype,yt=Object.prototype,bt=mt.toString,vt=yt.hasOwnProperty,Ct=RegExp("^"+bt.call(vt).replace(gt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wt(t){if(!W(t)||ct(t))return!1;var e=Q(t)?Ct:ft;return e.test(pt(t))}var xt=wt;function Et(t,e){return null==t?void 0:t[e]}var St=Et;function At(t,e){var n=St(t,e);return xt(n)?n:void 0}var Mt=At,kt=Mt(Object,"create"),Ot=kt;function Pt(){this.__data__=Ot?Ot(null):{},this.size=0}var Tt=Pt;function Dt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Nt=Dt,jt="__lodash_hash_undefined__",Lt=Object.prototype,Ft=Lt.hasOwnProperty;function Bt(t){var e=this.__data__;if(Ot){var n=e[t];return n===jt?void 0:n}return Ft.call(e,t)?e[t]:void 0}var Rt=Bt,$t=Object.prototype,zt=$t.hasOwnProperty;function It(t){var e=this.__data__;return Ot?void 0!==e[t]:zt.call(e,t)}var _t=It,Vt="__lodash_hash_undefined__";function Gt(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ot&&void 0===e?Vt:e,this}var Ht=Gt;function Ut(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e-1}var oe=re;function ae(t,e){var n=this.__data__,i=Kt(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}var le=ae;function ce(t){var e=-1,n=null==t?0:t.length;this.clear();while(++e-1}var Ue=He;function qe(t,e,n){var i=-1,s=null==t?0:t.length;while(++i=on){var c=e?null:rn(t);if(c)return en(c);o=!1,s=Ye,l=new Fe}else l=e?[]:a;t:while(++i0&&n(a)?e>1?Mn(a,e-1,n,i,s):dn(s,a):i||(s[s.length]=a)}return s}var kn=Mn;function On(t){return t}var Pn=On;function Tn(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var Dn=Tn,Nn=Math.max;function jn(t,e,n){return e=Nn(void 0===e?t.length-1:e,0),function(){var i=arguments,s=-1,r=Nn(i.length-e,0),o=Array(r);while(++s0){if(++e>=_n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Un=Hn,qn=Un(In),Wn=qn;function Xn(t,e){return Wn(Ln(t,e,Pn),t+"")}var Yn=Xn;function Jn(t){return gn(t)&&st(t)}var Zn=Jn,Kn=Yn((function(t){return ln(kn(t,1,Zn,!0))})),Qn=Kn,ti="[object Symbol]";function ei(t){return"symbol"==typeof t||gn(t)&&U(t)==ti}var ni=ei,ii=4294967295,si=ii-1,ri=Math.floor,oi=Math.min;function ai(t,e,n,i){var s=0,r=null==t?0:t.length;if(0===r)return 0;e=n(e);var o=e!==e,a=null===e,l=ni(e),c=void 0===e;while(s>>1;function ui(t,e,n){var i=0,s=null==t?i:t.length;if("number"==typeof e&&e===e&&s<=hi){while(i>>1,o=t[r];null!==o&&!ni(o)&&(n?o<=e:oa))return!1;var c=r.get(t),h=r.get(e);if(c&&h)return c==e&&h==t;var u=-1,d=!0,p=n&Di?new Fe:void 0;r.set(t,e),r.set(e,t);while(++u-1&&t%1==0&&te||r&&o&&l&&!a&&!c||i&&o&&l||!n&&l||!s)return 1;if(!i&&!r&&!c&&t=a)return l;var c=n[i];return l*("desc"==c?-1:1)}}return t.index-e.index}var $a=Ra;function za(t,e,n){e=e.length?$o(e,(function(t){return E(t)?function(e){return Ko(e,1===t.length?t[0]:t)}:t})):[Pn];var i=-1;e=$o(e,er(ba));var s=Na(t,(function(t,n,s){var r=$o(e,(function(e){return e(t)}));return{criteria:r,index:++i,value:t}}));return La(s,(function(t,e){return $a(t,e,n)}))}var Ia=za;function _a(t,e,n){if(!W(n))return!1;var i=typeof e;return!!("number"==i?st(n)&&Ms(e,n.length):"string"==i&&e in n)&&Jt(n[e],t)}var Va=_a,Ga=Yn((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Va(t,e[0],e[1])?e=[]:n>2&&Va(e[0],e[1],e[2])&&(e=[e[0]]),Ia(t,kn(e,1),[])})),Ha=Ga;function Ua(t,e,n){"__proto__"==e&&$n?$n(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var qa=Ua;function Wa(t,e,n,i){var s=-1,r=null==t?0:t.length;while(++s=il&&(r=Ye,o=!1,e=new Fe(e));t:while(++s1?n[s-1]:void 0,o=s>2?n[2]:void 0;r=t.length>3&&"function"==typeof r?(s--,r):void 0,o&&Va(n[0],n[1],o)&&(r=s<3?void 0:r,s=1),e=Object(e);while(++i2?e[2]:void 0;s&&Va(e[0],e[1],s)&&(i=1);while(++n{Object.getOwnPropertyNames(e.prototype).forEach((n=>{"constructor"!==n&&Object.defineProperty(t.prototype,n,Object.getOwnPropertyDescriptor(e.prototype,n))}))}))}const zu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])};function Iu(t,e){function n(){this.constructor=t}zu(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}class _u{}const Vu=/^\s*class\s+/.test(`${_u}`)||/^\s*class\s*\{/.test(`${class{}}`);function Gu(t,e){let n;return Vu?n=class extends e{}:(n=function(){return e.apply(this,arguments)},Iu(n,e)),Object.defineProperty(n,"name",{value:t}),n}function Hu(t){return"__proto__"===t}function Uu(t,e,n="/"){let i;const s=Array.isArray(e)?e:e.split(n);if(s.length){i=t;while(s.length){const t=s.shift();if(Object(i)!==i||!t||!(t in i))return;i=i[t]}}return i}function qu(t,e,n,i="/"){const s=Array.isArray(e)?e:e.split(i),r=s.pop();if(r&&!Hu(r)){let e=t;s.forEach((t=>{Hu(t)||(null==e[t]&&(e[t]={}),e=e[t])})),e[r]=n}return t}function Wu(t,e,n="/"){const i=Array.isArray(e)?e.slice():e.split(n),s=i.pop();if(s)if(i.length>0){const e=Uu(t,i);e&&delete e[s]}else delete t[s];return t}function Xu(t){return function(e){return null==t?void 0:t[e]}}var Yu=Xu,Ju={"&":"&","<":"<",">":">",'"':""","'":"'"},Zu=Yu(Ju),Ku=Zu,Qu=/[&<>"']/g,td=RegExp(Qu.source);function ed(t){return t=Uo(t),t&&td.test(t)?t.replace(Qu,Ku):t}var nd=ed,id={"&":"&","<":"<",">":">",""":'"',"'":"'"},sd=(Yu(id),/&(?:amp|lt|gt|quot|#39);/g);RegExp(sd.source);function rd(t,e,n){return t===t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}var od=rd,ad=/\s/;function ld(t){var e=t.length;while(e--&&ad.test(t.charAt(e)));return e}var cd=ld,hd=/^\s+/;function ud(t){return t?t.slice(0,cd(t)+1).replace(hd,""):t}var dd=ud,pd=NaN,gd=/^[-+]0x[0-9a-f]+$/i,fd=/^0b[01]+$/i,md=/^0o[0-7]+$/i,yd=parseInt;function bd(t){if("number"==typeof t)return t;if(ni(t))return pd;if(W(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=W(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=dd(t);var n=fd.test(t);return n||md.test(t)?yd(t.slice(2),n?2:8):gd.test(t)?pd:+t}var vd=bd;function Cd(t,e,n){var i=-1,s=t.length;e<0&&(e=-e>s?0:s+e),n=n>s?s:n,n<0&&(n+=s),s=e>n?0:n-e>>>0,e>>>=0;var r=Array(s);while(++i=i?t:wd(t,e,n)}var Ed=xd,Sd="\\ud800-\\udfff",Ad="\\u0300-\\u036f",Md="\\ufe20-\\ufe2f",kd="\\u20d0-\\u20ff",Od=Ad+Md+kd,Pd="\\ufe0e\\ufe0f",Td="\\u200d",Dd=RegExp("["+Td+Sd+Od+Pd+"]");function Nd(t){return Dd.test(t)}var jd=Nd,Ld="[object RegExp]";function Fd(t){return gn(t)&&U(t)==Ld}var Bd=Fd,Rd=ar&&ar.isRegExp;Rd&&er(Rd);function $d(t){return t.split("")}var zd=$d,Id="\\ud800-\\udfff",_d="\\u0300-\\u036f",Vd="\\ufe20-\\ufe2f",Gd="\\u20d0-\\u20ff",Hd=_d+Vd+Gd,Ud="\\ufe0e\\ufe0f",qd="["+Id+"]",Wd="["+Hd+"]",Xd="\\ud83c[\\udffb-\\udfff]",Yd="(?:"+Wd+"|"+Xd+")",Jd="[^"+Id+"]",Zd="(?:\\ud83c[\\udde6-\\uddff]){2}",Kd="[\\ud800-\\udbff][\\udc00-\\udfff]",Qd="\\u200d",tp=Yd+"?",ep="["+Ud+"]?",np="(?:"+Qd+"(?:"+[Jd,Zd,Kd].join("|")+")"+ep+tp+")*",ip=ep+tp+np,sp="(?:"+[Jd+Wd+"?",Wd,Zd,Kd,qd].join("|")+")",rp=RegExp(Xd+"(?="+Xd+")|"+sp+ip,"g");function op(t){return t.match(rp)||[]}var ap=op;function lp(t){return jd(t)?ap(t):zd(t)}var cp=lp;Math.floor;da("length");var hp="\\ud800-\\udfff",up="\\u0300-\\u036f",dp="\\ufe20-\\ufe2f",pp="\\u20d0-\\u20ff",gp=up+dp+pp,fp="\\ufe0e\\ufe0f",mp="["+hp+"]",yp="["+gp+"]",bp="\\ud83c[\\udffb-\\udfff]",vp="(?:"+yp+"|"+bp+")",Cp="[^"+hp+"]",wp="(?:\\ud83c[\\udde6-\\uddff]){2}",xp="[\\ud800-\\udbff][\\udc00-\\udfff]",Ep="\\u200d",Sp=vp+"?",Ap="["+fp+"]?",Mp="(?:"+Ep+"(?:"+[Cp,wp,xp].join("|")+")"+Ap+Sp+")*",kp=Ap+Sp+Mp,Op="(?:"+[Cp+yp+"?",yp,wp,xp,mp].join("|")+")";RegExp(bp+"(?="+bp+")|"+Op+kp,"g");Math.ceil;Math.ceil,Math.floor;var Pp=Ac((function(t,e,n,i){yc(e,Rl(e),t,i)})),Tp=Pp,Dp="[object DOMException]",Np="[object Error]";function jp(t){if(!gn(t))return!1;var e=U(t);return e==Np||e==Dp||"string"==typeof t.message&&"string"==typeof t.name&&!pc(t)}var Lp=jp,Fp=Yn((function(t,e){try{return Dn(t,void 0,e)}catch(n){return Lp(n)?n:new Error(n)}})),Bp=Fp;function Rp(t,e){return $o(e,(function(e){return t[e]}))}var $p=Rp,zp=Object.prototype,Ip=zp.hasOwnProperty;function _p(t,e,n,i){return void 0===t||Jt(t,zp[n])&&!Ip.call(i,n)?e:t}var Vp=_p,Gp={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Hp(t){return"\\"+Gp[t]}var Up=Hp,qp=/<%=([\s\S]+?)%>/g,Wp=qp,Xp=/<%-([\s\S]+?)%>/g,Yp=Xp,Jp=/<%([\s\S]+?)%>/g,Zp=Jp,Kp={escape:Yp,evaluate:Zp,interpolate:Wp,variable:"",imports:{_:{escape:nd}}},Qp=Kp,tg="Invalid `variable` option passed into `_.template`",eg=/\b__p \+= '';/g,ng=/\b(__p \+=) '' \+/g,ig=/(__e\(.*?\)|\b__t\)) \+\n'';/g,sg=/[()=,{}\[\]\/\s]/,rg=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,og=/($^)/,ag=/['\n\r\u2028\u2029\\]/g,lg=Object.prototype,cg=lg.hasOwnProperty;function hg(t,e,n){var i=Qp.imports._.templateSettings||Qp;n&&Va(t,e,n)&&(e=void 0),t=Uo(t),e=Tp({},e,i,Vp);var s,r,o=Tp({},e.imports,i.imports,Vp),a=kr(o),l=$p(o,a),c=0,h=e.interpolate||og,u="__p += '",d=RegExp((e.escape||og).source+"|"+h.source+"|"+(h===Wp?rg:og).source+"|"+(e.evaluate||og).source+"|$","g"),p=cg.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(d,(function(e,n,i,o,a,l){return i||(i=o),u+=t.slice(c,l).replace(ag,Up),n&&(s=!0,u+="' +\n__e("+n+") +\n'"),a&&(r=!0,u+="';\n"+a+";\n__p += '"),i&&(u+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=l+e.length,e})),u+="';\n";var g=cg.call(e,"variable")&&e.variable;if(g){if(sg.test(g))throw new Error(tg)}else u="with (obj) {\n"+u+"\n}\n";u=(r?u.replace(eg,""):u).replace(ng,"$1").replace(ig,"$1;"),u="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(r?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+u+"return __p\n}";var f=Bp((function(){return Function(a,p+"return "+u).apply(void 0,l)}));if(f.source=u,Lp(f))throw f;return f}var ug=hg,dg=0;function pg(t){var e=++dg;return Uo(t)+e}var gg=pg;function fg(t,e,n,i){var s=-1,r=null==t?0:t.length;i&&r&&(n=t[++s]);while(++s{const e=Object.create(null);return n=>{const i=e[n];return i||(e[n]=t(n))}},Wf=qf((t=>t.replace(/\B([A-Z])/g,"-$1").toLowerCase())),Xf=qf((t=>Ff(zf(t)).replace(/ /g,"")));qf((t=>_f(t).replace(/ /g,"_"))),qf((t=>Gf(t).replace(/ /g,"."))),qf((t=>Gf(t).replace(/ /g,"/"))),qf((t=>jf(Gf(t)))),qf((t=>Ff(zf(t))));function Yf(t){let e=2166136261,n=!1,i=t;for(let s=0,r=i.length;s127&&!n&&(i=unescape(encodeURIComponent(i)),t=i.charCodeAt(s),n=!0),e^=t,e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24)}return e>>>0}function Jf(){let t="";const e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let n=0,i=e.length;n{const e=t;if(e){const t=e.attributes;if(t)for(let n=0,i=t.length;n").append(n).html()}function Kf(t,e,n){const i=Math.min(2,Math.floor(.34*t.length));let s,r=Math.floor(.4*t.length)+1,o=!1;const a=t.toLowerCase();for(const l of e){const e=n(l);if(void 0!==e&&Math.abs(e.length-a.length)<=i){const n=e.toLowerCase();if(n===a){if(e===t)continue;return l}if(o)continue;if(e.length<3)continue;const i=Qf(a,n,r-1);if(void 0===i)continue;i<3?(o=!0,s=l):(r=i,s=l)}}return s}function Qf(t,e,n){let i=new Array(e.length+1),s=new Array(e.length+1);const r=n+1;for(let a=0;a<=e.length;a+=1)i[a]=a;for(let a=1;a<=t.length;a+=1){const o=t.charCodeAt(a-1),l=a>n?a-n:1,c=e.length>n+a?n+a:e.length;s[0]=a;let h=a;for(let t=1;tn)return;const u=i;i=s,s=u}const o=i[e.length];return o>n?void 0:o}var tm="[object Number]";function em(t){return"number"==typeof t||gn(t)&&U(t)==tm}var nm=em;O.isFinite;function im(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=vd(n),n=n===n?n:0),void 0!==e&&(e=vd(e),e=e===e?e:0),od(vd(t),e,n)}var sm=im;Math.max,Math.min;O.parseInt;const rm=t=>!Array.isArray(t)&&t-parseFloat(t)+1>=0;function om(t){return"string"===typeof t&&"%"===t.slice(-1)}function am(t,e){if(null==t)return 0;let n;if("string"===typeof t){if(n=parseFloat(t),om(t)&&(n/=100,Number.isFinite(n)))return n*e}else n=t;return Number.isFinite(n)?n>0&&n<1?n*e:n:0}function lm(t,e){function n(e){const n=new RegExp(`(?:\\d+(?:\\.\\d+)*)(${e})$`).exec(t);return n?n[1]:null}const i=parseFloat(t);if(Number.isNaN(i))return null;let s;if(null==e)s="[A-Za-z]*";else if(Array.isArray(e)){if(0===e.length)return null;s=e.join("|")}else"string"===typeof e&&(s=e);const r=n(s);return null===r?null:{unit:r,value:i}}function cm(t){if("object"===typeof t){let e=0,n=0,i=0,s=0;return null!=t.vertical&&Number.isFinite(t.vertical)&&(n=s=t.vertical),null!=t.horizontal&&Number.isFinite(t.horizontal)&&(i=e=t.horizontal),null!=t.left&&Number.isFinite(t.left)&&(e=t.left),null!=t.top&&Number.isFinite(t.top)&&(n=t.top),null!=t.right&&Number.isFinite(t.right)&&(i=t.right),null!=t.bottom&&Number.isFinite(t.bottom)&&(s=t.bottom),{top:n,right:i,bottom:s,left:e}}let e=0;return null!=t&&Number.isFinite(t)&&(e=t),{top:e,right:e,bottom:e,left:e}}var hm=function(){return O.Date.now()},um=hm,dm="Expected a function",pm=Math.max,gm=Math.min;function fm(t,e,n){var i,s,r,o,a,l,c=0,h=!1,u=!1,d=!0;if("function"!=typeof t)throw new TypeError(dm);function p(e){var n=i,r=s;return i=s=void 0,c=e,o=t.apply(r,n),o}function g(t){return c=t,a=setTimeout(y,e),h?p(t):o}function f(t){var n=t-l,i=t-c,s=e-n;return u?gm(s,r-i):s}function m(t){var n=t-l,i=t-c;return void 0===l||n>=e||n<0||u&&i>=r}function y(){var t=um();if(m(t))return b(t);a=setTimeout(y,f(t))}function b(t){return a=void 0,d&&i?p(t):(i=s=void 0,o)}function v(){void 0!==a&&clearTimeout(a),c=0,i=l=s=a=void 0}function C(){return void 0===a?o:b(um())}function w(){var t=um(),n=m(t);if(i=arguments,s=this,l=t,n){if(void 0===a)return g(l);if(u)return clearTimeout(a),a=setTimeout(y,e),p(l)}return void 0===a&&(a=setTimeout(y,e)),o}return e=vd(e)||0,W(n)&&(h=!!n.leading,u="maxWait"in n,r=u?pm(vd(n.maxWait)||0,e):r,d="trailing"in n?!!n.trailing:d),w.cancel=v,w.flush=C,w}var mm=fm,ym="Expected a function";function bm(t,e,n){if("function"!=typeof t)throw new TypeError(ym);return setTimeout((function(){t.apply(void 0,n)}),e)}var vm=bm,Cm=Yn((function(t,e){return vm(t,1,e)})),wm=Cm;function xm(t,e,n){if(n)switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2]);case 4:return t.call(e,n[0],n[1],n[2],n[3]);case 5:return t.call(e,n[0],n[1],n[2],n[3],n[4]);case 6:return t.call(e,n[0],n[1],n[2],n[3],n[4],n[5]);default:return t.apply(e,n)}return t.call(e)}function Em(t,e,...n){return xm(t,e,n)}function Sm(t){return"object"===typeof t&&t.then&&"function"===typeof t.then}function Am(t){return null!=t&&(t instanceof Promise||Sm(t))}function Mm(...t){const e=[];t.forEach((t=>{Array.isArray(t)?e.push(...t):e.push(t)}));const n=e.some((t=>Am(t)));if(n){const t=e.map((t=>Am(t)?t:Promise.resolve(!1!==t)));return Promise.all(t).then((t=>t.reduce(((t,e)=>!1!==e&&t),!0)))}return e.every((t=>!1!==t))}function km(...t){const e=Mm(t);return"boolean"===typeof e?Promise.resolve(e):e}const Om=/[\t\r\n\f]/g,Pm=/\S+/g,Tm=t=>` ${t} `;function Dm(t){return t&&t.getAttribute&&t.getAttribute("class")||""}function Nm(t,e){if(null==t||null==e)return!1;const n=Tm(Dm(t)),i=Tm(e);return 1===t.nodeType&&n.replace(Om," ").includes(i)}function jm(t,e){if(null!=t&&null!=e){if("function"===typeof e)return jm(t,e(Dm(t)));if("string"===typeof e&&1===t.nodeType){const n=e.match(Pm)||[],i=Tm(Dm(t)).replace(Om," ");let s=n.reduce(((t,e)=>t.indexOf(Tm(e))<0?`${t}${e} `:t),i);s=s.trim(),i!==s&&t.setAttribute("class",s)}}}function Lm(t,e){if(null!=t){if("function"===typeof e)return Lm(t,e(Dm(t)));if((!e||"string"===typeof e)&&1===t.nodeType){const n=(e||"").match(Pm)||[],i=Tm(Dm(t)).replace(Om," ");let s=n.reduce(((t,e)=>{const n=Tm(e);return t.indexOf(n)>-1?t.replace(n," "):t}),i);s=e?s.trim():"",i!==s&&t.setAttribute("class",s)}}}function Fm(t,e,n){if(null!=t&&null!=e)if(null==n||"string"!==typeof e){if("function"===typeof e)return Fm(t,e(Dm(t),n),n);if("string"===typeof e){const n=e.match(Pm)||[];n.forEach((e=>{Nm(t,e)?Lm(t,e):jm(t,e)}))}}else n?jm(t,e):Lm(t,e)}let Bm=0;function Rm(){return Bm+=1,`v${Bm}`}function $m(t){return null!=t.id&&""!==t.id||(t.id=Rm()),t.id}function zm(t){return null!=t&&("function"===typeof t.getScreenCTM&&t instanceof SVGElement)}const Im={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},_m="1.1";function Vm(t,e=document){return e.createElement(t)}function Gm(t,e=Im.xhtml,n=document){return n.createElementNS(e,t)}function Hm(t,e=document){return Gm(t,Im.svg,e)}function Um(t){if(t){const e=`${t}`,{documentElement:n}=qm(e,{async:!1});return n}const e=document.createElementNS(Im.svg,"svg");return e.setAttributeNS(Im.xmlns,"xmlns:xlink",Im.xlink),e.setAttribute("version",_m),e}function qm(t,e={}){let n;try{const i=new DOMParser;if(null!=e.async){const t=i;t.async=e.async}n=i.parseFromString(t,e.mimeType||"text/xml")}catch(i){n=void 0}if(!n||n.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${t}`);return n}function Wm(t,e=!0){const n=t.nodeName;return e?n.toLowerCase():n.toUpperCase()}function Xm(t){let e=0,n=t.previousSibling;while(n)1===n.nodeType&&(e+=1),n=n.previousSibling;return e}function Ym(t,e){return t.querySelectorAll(e)}function Jm(t,e){return t.querySelector(e)}function Zm(t,e,n){const i=t.ownerSVGElement;let s=t.parentNode;while(s&&s!==n&&s!==i){if(Nm(s,e))return s;s=s.parentNode}return null}function Km(t,e){const n=e&&e.parentNode;return t===n||!!(n&&1===n.nodeType&&16&t.compareDocumentPosition(n))}function Qm(t){t.parentNode&&t.parentNode.removeChild(t)}function ty(t){while(t.firstChild)t.removeChild(t.firstChild)}function ey(t,e){const n=Array.isArray(e)?e:[e];n.forEach((e=>{null!=e&&t.appendChild(e)}))}function ny(t,e){const n=t.firstChild;return n?iy(n,e):ey(t,e)}function iy(t,e){const n=t.parentNode;if(n){const i=Array.isArray(e)?e:[e];i.forEach((e=>{null!=e&&n.insertBefore(e,t)}))}}function sy(t,e){null!=e&&e.appendChild(t)}function ry(t){try{return t instanceof HTMLElement}catch(e){return"object"===typeof t&&1===t.nodeType&&"object"===typeof t.style&&"object"===typeof t.ownerDocument}}function oy(t,e){return t.getAttribute(e)}function ay(t,e){const n=uy(e);n.ns?t.hasAttributeNS(n.ns,n.local)&&t.removeAttributeNS(n.ns,n.local):t.hasAttribute(e)&&t.removeAttribute(e)}function ly(t,e,n){if(null==n)return ay(t,e);const i=uy(e);i.ns&&"string"===typeof n?t.setAttributeNS(i.ns,e,n):"id"===e?t.id=`${n}`:t.setAttribute(e,`${n}`)}function cy(t,e){Object.keys(e).forEach((n=>{ly(t,n,e[n])}))}function hy(t,e,n){if(null==e){const e=t.attributes,n={};for(let t=0;t{const i=Wf(n);e[i]=t[n]})),e}function py(t){const e={},n=t.split(";");return n.forEach((t=>{const n=t.trim();if(n){const t=n.split("=");t.length&&(e[t[0].trim()]=t[1]?t[1].trim():"")}})),e}function gy(t,e){return Object.keys(e).forEach((n=>{if("class"===n)t[n]=t[n]?`${t[n]} ${e[n]}`:e[n];else if("style"===n){const i="object"===typeof t[n],s="object"===typeof e[n];let r,o;i&&s?(r=t[n],o=e[n]):i?(r=t[n],o=py(e[n])):s?(r=py(t[n]),o=e[n]):(r=py(t[n]),o=py(e[n])),t[n]=gy(r,o)}else t[n]=e[n]})),t}function fy(t,e,n={}){const i=n.offset||0,s=[],r=[];let o,a,l=null;for(let c=0;c=l&&c{e[n]=r(t[n])})),e}t.emptyObject=Object.freeze({}),t.emptyArray=Object.freeze([]),t.isPrimitive=e,t.isArray=n,t.isObject=i,t.deepEqual=s,t.deepCopy=r})(yy||(yy={})),function(t){function e(t){const e="data:";return t.substr(0,e.length)===e}function n(t,n){if(!t||e(t))return void setTimeout((()=>n(null,t)));const i=()=>{n(new Error(`Failed to load image: ${t}`))},s=window.FileReader?t=>{if(200===t.status){const e=new FileReader;e.onload=t=>{const e=t.target.result;n(null,e)},e.onerror=i,e.readAsDataURL(t.response)}else i()}:e=>{const s=t=>{const e=32768,n=[];for(let i=0;is(r))),r.send()}function i(t){let e=t.replace(/\s/g,"");e=decodeURIComponent(e);const n=e.indexOf(","),i=e.slice(0,n),s=i.split(":")[1].split(";")[0],r=e.slice(n+1);let o;o=i.indexOf("base64")>=0?atob(r):unescape(encodeURIComponent(r));const a=new Uint8Array(o.length);for(let l=0;l]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return e&&e[2]?e[2].replace(/\s+/," ").split(" "):null}function a(t){const e=parseFloat(t);return Number.isNaN(e)?null:e}function l(t,e={}){let n=null;const i=e=>(null==n&&(n=o(t)),null!=n?a(n[e]):null),s=e=>{const n=t.match(e);return n&&n[2]?a(n[2]):null};let r=e.width;if(null==r&&(r=s(/]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),null==r&&(r=i(2)),null==r)throw new Error("Can not parse width from svg string");let l=e.height;if(null==l&&(l=s(/]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),null==l&&(l=i(3)),null==l)throw new Error("Can not parse height from svg string");const c=encodeURIComponent(t).replace(/'/g,"%27").replace(/"/g,"%22"),h="data:image/svg+xml",u=`${h},${c}`;return u}t.isDataUrl=e,t.imageToDataUri=n,t.dataUriToBlob=i,t.downloadBlob=s,t.downloadDataUri=r,t.svgToDataUrl=l}(by||(by={}));const Cy={px(t){return t},mm(t){return vy*t},cm(t){return vy*t*10},in(t){return vy*t*25.4},pt(t){return vy*(25.4*t/72)},pc(t){return vy*(25.4*t/6)}};var wy;(function(t){function e(t,e,n){const i=v()("
").css({display:"inline-block",position:"absolute",left:-15e3,top:-15e3,width:t+(n||""),height:e+(n||"")}).appendTo(document.body),s={width:i.width()||0,height:i.height()||0};return i.remove(),s}function n(t,n){null==vy&&(vy=e("1","1","mm").width);const i=n?Cy[n]:null;return i?i(t):t}t.measure=e,t.toPx=n})(wy||(wy={}));const xy=function(){let t;const e=window;if(null!=e&&(t=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame,null!=t&&(t=t.bind(e))),null==t){let e=0;t=t=>{const n=(new Date).getTime(),i=Math.max(0,16-(n-e)),s=setTimeout((()=>{t(n+i)}),i);return e=n+i,s}}return t}(),Ey=function(){let t;const e=window;return null!=e&&(t=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame||e.msCancelAnimationFrame||e.msCancelRequestAnimationFrame||e.oCancelAnimationFrame||e.oCancelRequestAnimationFrame||e.mozCancelAnimationFrame||e.mozCancelRequestAnimationFrame,t&&(t=t.bind(e))),null==t&&(t=clearTimeout),t}();document&&document.createElement("div").style;function Sy(t,e){const n=t.ownerDocument&&t.ownerDocument.defaultView&&t.ownerDocument.defaultView.opener?t.ownerDocument.defaultView.getComputedStyle(t,null):window.getComputedStyle(t,null);return n&&e?n.getPropertyValue(e)||n[e]:n}(function(){const t=document;t.selection||window.getSelection})();var Ay;function My(t,e=0){return Number.isInteger(t)?t:+t.toFixed(e)}function ky(t,e){let n,i;if(null==e?(i=null==t?1:t,n=0):(i=e,n=null==t?0:t),in?n:t:te?e:t}function Py(t,e){return e*Math.round(t/e)}function Ty(t,e){return null!=e&&null!=t&&e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height}function Dy(t,e){const n=t.x-e.x,i=t.y-e.y;return n*n+i*i}(function(t){function e(t){return 180*t/Math.PI%360}function n(t){return t%360+(t<0?360:0)}t.toDeg=e,t.toRad=function(t,e=!1){const n=e?t:t%360;return n*Math.PI/180},t.normalize=n})(Ay||(Ay={}));class Ny{valueOf(){return this.toJSON()}toString(){return JSON.stringify(this.toJSON())}}class jy extends Ny{constructor(t,e){super(),this.x=null==t?0:t,this.y=null==e?0:e}get[Symbol.toStringTag](){return jy.toStringTag}round(t=0){return this.x=My(this.x,t),this.y=My(this.y,t),this}add(t,e){const n=jy.create(t,e);return this.x+=n.x,this.y+=n.y,this}update(t,e){const n=jy.create(t,e);return this.x=n.x,this.y=n.y,this}translate(t,e){const n=jy.create(t,e);return this.x+=n.x,this.y+=n.y,this}rotate(t,e){const n=jy.rotate(this,t,e);return this.x=n.x,this.y=n.y,this}scale(t,e,n=new jy){const i=jy.create(n);return this.x=i.x+t*(this.x-i.x),this.y=i.y+e*(this.y-i.y),this}closest(t){if(1===t.length)return jy.create(t[0]);let e=null,n=1/0;return t.forEach((t=>{const i=this.squaredDistance(t);ii&&(o=(this.x+this.width-i)/(g.x-i)),g.y>s&&(h=(this.y+this.height-s)/(g.y-s));const f=n.topRight;f.x>i&&(a=(this.x+this.width-i)/(f.x-i)),f.ys&&(d=(this.y+this.height-s)/(m.y-s)),{sx:Math.min(r,o,a,l),sy:Math.min(c,h,u,d)}}getMaxUniformScaleToFit(t,e=this.center){const n=this.getMaxScaleToFit(t,e);return Math.min(n.sx,n.sy)}containsPoint(t,e){return Ty(this,jy.create(t,e))}containsRect(t,e,n,i){const s=Ly.create(t,e,n,i),r=this.x,o=this.y,a=this.width,l=this.height,c=s.x,h=s.y,u=s.width,d=s.height;return 0!==a&&0!==l&&0!==u&&0!==d&&(c>=r&&h>=o&&c+u<=r+a&&h+d<=o+l)}intersectsWithLine(t){const e=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],n=[],i=[];return e.forEach((e=>{const s=t.intersectsWithLine(e);null!==s&&i.indexOf(s.toString())<0&&(n.push(s),i.push(s.toString()))})),n.length>0?n:null}intersectsWithLineFromCenterToPoint(t,e){const n=jy.clone(t),i=this.center;let s=null;null!=e&&0!==e&&n.rotate(e,i);const r=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],o=new Fy(i,n);for(let a=r.length-1;a>=0;a-=1){const t=r[a].intersectsWithLine(o);if(null!==t){s=t;break}}return s&&null!=e&&0!==e&&s.rotate(-e,i),s}intersectsWithRect(t,e,n,i){const s=Ly.create(t,e,n,i);if(!this.isIntersectWithRect(s))return null;const r=this.origin,o=this.corner,a=s.origin,l=s.corner,c=Math.max(r.x,a.x),h=Math.max(r.y,a.y);return new Ly(c,h,Math.min(o.x,l.x)-c,Math.min(o.y,l.y)-h)}isIntersectWithRect(t,e,n,i){const s=Ly.create(t,e,n,i),r=this.origin,o=this.corner,a=s.origin,l=s.corner;return!(l.x<=r.x||l.y<=r.y||a.x>=o.x||a.y>=o.y)}normalize(){let t=this.x,e=this.y,n=this.width,i=this.height;return this.width<0&&(t=this.x+this.width,n=-this.width),this.height<0&&(e=this.y+this.height,i=-this.height),this.x=t,this.y=e,this.width=n,this.height=i,this}union(t){const e=Ly.clone(t),n=this.origin,i=this.corner,s=e.origin,r=e.corner,o=Math.min(n.x,s.x),a=Math.min(n.y,s.y),l=Math.max(i.x,r.x),c=Math.max(i.y,r.y);return new Ly(o,a,l-o,c-a)}getNearestSideToPoint(t){const e=jy.clone(t),n=e.x-this.x,i=this.x+this.width-e.x,s=e.y-this.y,r=this.y+this.height-e.y;let o=n,a="left";return i=1?n.clone():e.lerp(n,t)}pointAtLength(t){const e=this.start,n=this.end;let i=!0;t<0&&(i=!1,t=-t);const s=this.length();if(t>=s)return i?n.clone():e.clone();const r=(i?t:s-t)/s;return this.pointAt(r)}divideAt(t){const e=this.pointAt(t);return[new Fy(this.start,e),new Fy(e,this.end)]}divideAtLength(t){const e=this.pointAtLength(t);return[new Fy(this.start,e),new Fy(e,this.end)]}containsPoint(t){const e=this.start,n=this.end;if(0!==e.cross(t,n))return!1;const i=this.length();return!(new Fy(e,t).length()>i)&&!(new Fy(t,n).length()>i)}intersect(t,e){const n=t.intersectsWithLine(this,e);return n?Array.isArray(n)?n:[n]:null}intersectsWithLine(t){const e=new jy(this.end.x-this.start.x,this.end.y-this.start.y),n=new jy(t.end.x-t.start.x,t.end.y-t.start.y),i=e.x*n.y-e.y*n.x,s=new jy(t.start.x-this.start.x,t.start.y-this.start.y),r=s.x*n.y-s.y*n.x,o=s.x*e.y-s.y*e.x;if(0===i||r*i<0||o*i<0)return null;if(i>0){if(r>i||o>i)return null}else if(r0&&(i-=r,s-=o,a=i*r+s*o,a<0&&(a=0))),a<0?-1:a>0?1:0}equals(t){return null!=t&&this.start.x===t.start.x&&this.start.y===t.start.y&&this.end.x===t.end.x&&this.end.y===t.end.y}clone(){return new Fy(this.start,this.end)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.end.serialize()].join(" ")}}(function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;try{if((null==n||n===t.toStringTag)&&jy.isPoint(i.start)&&jy.isPoint(i.end)&&"function"===typeof i.vector&&"function"===typeof i.bearing&&"function"===typeof i.parallel&&"function"===typeof i.intersect)return!0}catch(s){return!1}return!1}t.toStringTag=`X6.Geometry.${t.name}`,t.isLine=e})(Fy||(Fy={}));class By extends Ny{constructor(t,e,n,i){super(),this.x=null==t?0:t,this.y=null==e?0:e,this.a=null==n?0:n,this.b=null==i?0:i}get[Symbol.toStringTag](){return By.toStringTag}get center(){return new jy(this.x,this.y)}bbox(){return Ly.fromEllipse(this)}getCenter(){return this.center}inflate(t,e){const n=t,i=null!=e?e:t;return this.a+=2*n,this.b+=2*i,this}normalizedDistance(t,e){const n=jy.create(t,e),i=n.x-this.x,s=n.y-this.y,r=this.a,o=this.b;return i*i/(r*r)+s*s/(o*o)}containsPoint(t,e){return this.normalizedDistance(t,e)<=1}intersectsWithLine(t){const e=[],n=this.a,i=this.b,s=t.start,r=t.end,o=t.vector(),a=s.diff(new jy(this.x,this.y)),l=new jy(o.x/(n*n),o.y/(i*i)),c=new jy(a.x/(n*n),a.y/(i*i)),h=o.dot(l),u=o.dot(c),d=a.dot(c)-1,p=u*u-h*d;if(p<0)return null;if(p>0){const t=Math.sqrt(p),n=(-u-t)/h,i=(-u+t)/h;if((n<0||n>1)&&(i<0||i>1))return null;n>=0&&n<=1&&e.push(s.lerp(r,n)),i>=0&&i<=1&&e.push(s.lerp(r,i))}else{const t=-u/h;if(!(t>=0&&t<=1))return null;e.push(s.lerp(r,t))}return e}intersectsWithLineFromCenterToPoint(t,e=0){const n=jy.clone(t);e&&n.rotate(e,this.getCenter());const i=n.x-this.x,s=n.y-this.y;let r;if(0===i)return r=this.bbox().getNearestPointToPoint(n),e?r.rotate(-e,this.getCenter()):r;const o=s/i,a=o*o,l=this.a*this.a,c=this.b*this.b;let h=Math.sqrt(1/(1/l+a/c));h=i<0?-h:h;const u=o*h;return r=new jy(this.x+h,this.y+u),e?r.rotate(-e,this.getCenter()):r}tangentTheta(t){const e=jy.clone(t),n=e.x,i=e.y,s=this.a,r=this.b,o=this.bbox().center,a=o.x,l=o.y,c=30,h=n>o.x+s/2,u=no.x?i-c:i+c,d=s*s/(n-a)-s*s*(i-l)*(p-l)/(r*r*(n-a))+a):(d=i>o.y?n+c:n-c,p=r*r/(i-l)-r*r*(n-a)*(d-a)/(s*s*(i-l))+l),new jy(d,p).theta(e)}scale(t,e){return this.a*=t,this.b*=e,this}rotate(t,e){const n=Ly.fromEllipse(this);n.rotate(t,e);const i=By.fromRect(n);return this.a=i.a,this.b=i.b,this.x=i.x,this.y=i.y,this}translate(t,e){const n=jy.create(t,e);return this.x+=n.x,this.y+=n.y,this}equals(t){return null!=t&&t.x===this.x&&t.y===this.y&&t.a===this.a&&t.b===this.b}clone(){return new By(this.x,this.y,this.a,this.b)}toJSON(){return{x:this.x,y:this.y,a:this.a,b:this.b}}serialize(){return`${this.x} ${this.y} ${this.a} ${this.b}`}}(function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return(null==n||n===t.toStringTag)&&"number"===typeof i.x&&"number"===typeof i.y&&"number"===typeof i.a&&"number"===typeof i.b&&"function"===typeof i.inflate&&"function"===typeof i.normalizedDistance}t.toStringTag=`X6.Geometry.${t.name}`,t.isEllipse=e})(By||(By={})),function(t){function e(e,i,s,r){return null==e||"number"===typeof e?new t(e,i,s,r):n(e)}function n(e){return t.isEllipse(e)?e.clone():Array.isArray(e)?new t(e[0],e[1],e[2],e[3]):new t(e.x,e.y,e.a,e.b)}function i(e){const n=e.center;return new t(n.x,n.y,e.width/2,e.height/2)}t.create=e,t.parse=n,t.fromRect=i}(By||(By={}));class Ry extends Ny{constructor(t){if(super(),null!=t){if("string"===typeof t)return Ry.parse(t);this.points=t.map((t=>jy.create(t)))}else this.points=[]}get[Symbol.toStringTag](){return Ry.toStringTag}get start(){return 0===this.points.length?null:this.points[0]}get end(){return 0===this.points.length?null:this.points[this.points.length-1]}scale(t,e,n=new jy){return this.points.forEach((i=>i.scale(t,e,n))),this}rotate(t,e){return this.points.forEach((n=>n.rotate(t,e))),this}translate(t,e){const n=jy.create(t,e);return this.points.forEach((t=>t.translate(n.x,n.y))),this}bbox(){if(0===this.points.length)return new Ly;let t=1/0,e=-1/0,n=1/0,i=-1/0;const s=this.points;for(let r=0,o=s.length;re&&(e=a),li&&(i=l)}return new Ly(t,n,e-t,i-n)}closestPoint(t){const e=this.closestPointLength(t);return this.pointAtLength(e)}closestPointLength(t){const e=this.points,n=e.length;if(0===n||1===n)return 0;let i=0,s=0,r=1/0;for(let o=0,a=n-1;oc.y||i>r.y&&i<=c.y){const e=r.x-n>c.x-n?r.x-n:c.x-n;if(e>=0){const s=new jy(n+e,i),r=new Fy(t,s);h.intersectsWithLine(r)&&(a+=1)}}o=l}return a%2===1}intersectsWithLine(t){const e=[];for(let n=0,i=this.points.length-1;n0?e:null}isDifferentiable(){for(let t=0,e=this.points.length-1;t=1)return e[n-1].clone();const i=this.length(),s=i*t;return this.pointAtLength(s)}pointAtLength(t){const e=this.points,n=e.length;if(0===n)return null;if(1===n)return e[0].clone();let i=!0;t<0&&(i=!1,t=-t);let s=0;for(let o=0,a=n-1;o1&&(t=1);const i=this.length(),s=i*t;return this.tangentAtLength(s)}tangentAtLength(t){const e=this.points,n=e.length;if(0===n||1===n)return null;let i,s=!0;t<0&&(s=!1,t=-t);let r=0;for(let o=0,a=n-1;on.x)&&(n=t[u]);const i=[];for(let u=0;u{let n=t[2]-e[2];return 0===n&&(n=e[1]-t[1]),n})),i.length>2){const t=i[i.length-1];i.unshift(t)}const s={},r=[],o=t=>`${t[0].toString()}@${t[1]}`;while(0!==i.length){const t=i.pop(),e=t[0];if(s[o(t)])continue;let n=!1;while(!n)if(r.length<2)r.push(t),n=!0;else{const a=r.pop(),l=a[0],c=r.pop(),h=c[0],u=h.cross(l,e);if(u<0)r.push(c),r.push(a),r.push(t),n=!0;else if(0===u){const t=1e-10,n=l.angleBetween(h,e);Math.abs(n-180)2&&r.pop();let l=-1;for(let u=0,d=r.length;u0){const t=r.slice(l),e=r.slice(0,l);c=t.concat(e)}else c=r;const h=[];for(let u=0,d=c.length;ut.equals(this.points[e]))))}clone(){return new Ry(this.points.map((t=>t.clone())))}toJSON(){return this.points.map((t=>t.toJSON()))}serialize(){return this.points.map((t=>`${t.x}, ${t.y}`)).join(" ")}}(function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return(null==n||n===t.toStringTag)&&"function"===typeof i.toHull&&"function"===typeof i.simplify}t.toStringTag=`X6.Geometry.${t.name}`,t.isPolyline=e})(Ry||(Ry={})),function(t){function e(e){const n=e.trim();if(""===n)return new t;const i=[],s=n.split(/\s*,\s*|\s+/);for(let t=0,r=s.length;t0&&b<1&&p.push(b)}else w=m*m-4*y*f,x=Math.sqrt(w),w<0||(v=(-m+x)/(2*f),v>0&&v<1&&p.push(v),C=(-m-x)/(2*f),C>0&&C<1&&p.push(C));let M=p.length;const k=M;while(M)M-=1,b=p[M],A=1-b,E=A*A*A*s+3*A*A*b*o+3*A*b*b*l+b*b*b*h,g[0][M]=E,S=A*A*A*r+3*A*A*b*a+3*A*b*b*c+b*b*b*u,g[1][M]=S,d[M]={X:E,Y:S};p[k]=0,p[k+1]=1,d[k]={X:s,Y:r},d[k+1]={X:h,Y:u},g[0][k]=s,g[1][k]=r,g[0][k+1]=h,g[1][k+1]=u,p.length=k+2,g[0].length=k+2,g[1].length=k+2,d.length=k+2;const O=Math.min.apply(null,g[0]),P=Math.min.apply(null,g[1]),T=Math.max.apply(null,g[0]),D=Math.max.apply(null,g[1]);return new Ly(O,P,T-O,D-P)}closestPoint(t,e={}){return this.pointAtT(this.closestPointT(t,e))}closestPointLength(t,e={}){const n=this.getOptions(e);return this.lengthAtT(this.closestPointT(t,n),n)}closestPointNormalizedLength(t,e={}){const n=this.getOptions(e),i=this.closestPointLength(t,n);if(!i)return 0;const s=this.length(n);return 0===s?0:i/s}closestPointT(t,e={}){const n=this.getPrecision(e),i=this.getDivisions(e),s=Math.pow(10,-n);let r=null,o=0,a=0,l=0,c=0,h=0,u=null;const d=i.length;let p=d>0?1/d:0;i.forEach(((e,n)=>{const i=e.start.distance(t),s=e.end.distance(t),d=i+s;(null==u||d=1)return this.divideAtT(1);const n=this.tAt(t,e);return this.divideAtT(n)}divideAtLength(t,e={}){const n=this.tAtLength(t,e);return this.divideAtT(n)}divide(t){return this.divideAtT(t)}divideAtT(t){const e=this.start,n=this.controlPoint1,i=this.controlPoint2,s=this.end;if(t<=0)return[new $y(e,e,e,e),new $y(e,n,i,s)];if(t>=1)return[new $y(e,n,i,s),new $y(s,s,s,s)];const r=this.getSkeletonPoints(t),o=r.startControlPoint1,a=r.startControlPoint2,l=r.divider,c=r.dividerControlPoint1,h=r.dividerControlPoint2;return[new $y(e,o,a,l),new $y(l,c,h,s)]}endpointDistance(){return this.start.distance(this.end)}getSkeletonPoints(t){const e=this.start,n=this.controlPoint1,i=this.controlPoint2,s=this.end;if(t<=0)return{startControlPoint1:e.clone(),startControlPoint2:e.clone(),divider:e.clone(),dividerControlPoint1:n.clone(),dividerControlPoint2:i.clone()};if(t>=1)return{startControlPoint1:n.clone(),startControlPoint2:i.clone(),divider:s.clone(),dividerControlPoint1:s.clone(),dividerControlPoint2:s.clone()};const r=new Fy(e,n).pointAt(t),o=new Fy(n,i).pointAt(t),a=new Fy(i,s).pointAt(t),l=new Fy(r,o).pointAt(t),c=new Fy(o,a).pointAt(t),h=new Fy(l,c).pointAt(t);return{startControlPoint1:r,startControlPoint2:l,divider:h,dividerControlPoint1:c,dividerControlPoint2:a}}getSubdivisions(t={}){const e=this.getPrecision(t);let n=[new $y(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(0===e)return n;let i=this.endpointDistance();const s=Math.pow(10,-e);let r=0;while(1){r+=1;const t=[];n.forEach((e=>{const n=e.divide(.5);t.push(n[0],n[1])}));const e=t.reduce(((t,e)=>t+e.endpointDistance()),0),o=0!==e?(e-i)/e:0;if(r>1&&ot+e.endpointDistance()),0)}lengthAtT(t,e={}){if(t<=0)return 0;const n=void 0===e.precision?this.PRECISION:e.precision,i=this.divide(t)[0];return i.length({precision:n})}pointAt(t,e={}){if(t<=0)return this.start.clone();if(t>=1)return this.end.clone();const n=this.tAt(t,e);return this.pointAtT(n)}pointAtLength(t,e={}){const n=this.tAtLength(t,e);return this.pointAtT(n)}pointAtT(t){return t<=0?this.start.clone():t>=1?this.end.clone():this.getSkeletonPoints(t).divider}isDifferentiable(){const t=this.start,e=this.controlPoint1,n=this.controlPoint2,i=this.end;return!(t.equals(e)&&e.equals(n)&&n.equals(i))}tangentAt(t,e={}){if(!this.isDifferentiable())return null;t<0?t=0:t>1&&(t=1);const n=this.tAt(t,e);return this.tangentAtT(n)}tangentAtLength(t,e={}){if(!this.isDifferentiable())return null;const n=this.tAtLength(t,e);return this.tangentAtT(n)}tangentAtT(t){if(!this.isDifferentiable())return null;t<0&&(t=0),t>1&&(t=1);const e=this.getSkeletonPoints(t),n=e.startControlPoint2,i=e.dividerControlPoint1,s=e.divider,r=new Fy(n,i);return r.translate(s.x-n.x,s.y-n.y),r}getPrecision(t={}){return null==t.precision?this.PRECISION:t.precision}getDivisions(t={}){if(null!=t.subdivisions)return t.subdivisions;const e=this.getPrecision(t);return this.getSubdivisions({precision:e})}getOptions(t={}){const e=this.getPrecision(t),n=this.getDivisions(t);return{precision:e,subdivisions:n}}tAt(t,e={}){if(t<=0)return 0;if(t>=1)return 1;const n=this.getOptions(e),i=this.length(n),s=i*t;return this.tAtLength(s,n)}tAtLength(t,e={}){let n=!0;t<0&&(n=!1,t=-t);const i=this.getPrecision(e),s=this.getDivisions(e),r={precision:i,subdivisions:s};let o,a,l=null,c=0,h=0,u=0;const d=s.length;let p=d>0?1/d:0;for(let m=0;mn.push(t.end.clone()))),n}toPolyline(t={}){return new Ry(this.toPoints(t))}scale(t,e,n){return this.start.scale(t,e,n),this.controlPoint1.scale(t,e,n),this.controlPoint2.scale(t,e,n),this.end.scale(t,e,n),this}rotate(t,e){return this.start.rotate(t,e),this.controlPoint1.rotate(t,e),this.controlPoint2.rotate(t,e),this.end.rotate(t,e),this}translate(t,e){return"number"===typeof t?(this.start.translate(t,e),this.controlPoint1.translate(t,e),this.controlPoint2.translate(t,e),this.end.translate(t,e)):(this.start.translate(t),this.controlPoint1.translate(t),this.controlPoint2.translate(t),this.end.translate(t)),this}equals(t){return null!=t&&this.start.equals(t.start)&&this.controlPoint1.equals(t.controlPoint1)&&this.controlPoint2.equals(t.controlPoint2)&&this.end.equals(t.end)}clone(){return new $y(this.start,this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.controlPoint1.serialize(),this.controlPoint2.serialize(),this.end.serialize()].join(" ")}}(function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;try{if((null==n||n===t.toStringTag)&&jy.isPoint(i.start)&&jy.isPoint(i.controlPoint1)&&jy.isPoint(i.controlPoint2)&&jy.isPoint(i.end)&&"function"===typeof i.toPoints&&"function"===typeof i.toPolyline)return!0}catch(s){return!1}return!1}t.toStringTag=`X6.Geometry.${t.name}`,t.isCurve=e})($y||($y={})),function(t){function e(t){const e=t.length,n=[],i=[];let s=2;n[0]=t[0]/s;for(let r=1;rjy.clone(t))),i=[],s=[],r=n.length-1;if(1===r)return i[0]=new jy((2*n[0].x+n[1].x)/3,(2*n[0].y+n[1].y)/3),s[0]=new jy(2*i[0].x-n[0].x,2*i[0].y-n[0].y),[i,s];const o=[];for(let e=1;e=1?n:n*t}divideAtT(t){if(this.divideAt)return this.divideAt(t);throw new Error("Neither `divideAtT` nor `divideAt` method is implemented.")}pointAtT(t){if(this.pointAt)return this.pointAt(t);throw new Error("Neither `pointAtT` nor `pointAt` method is implemented.")}tangentAtT(t){if(this.tangentAt)return this.tangentAt(t);throw new Error("Neither `tangentAtT` nor `tangentAt` method is implemented.")}}class Iy extends zy{constructor(t,e){super(),Fy.isLine(t)?this.endPoint=t.end.clone().round(2):this.endPoint=jy.create(t,e).round(2)}get type(){return"L"}get line(){return new Fy(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(t){return this.line.closestPoint(t)}closestPointLength(t){return this.line.closestPointLength(t)}closestPointNormalizedLength(t){return this.line.closestPointNormalizedLength(t)}closestPointTangent(t){return this.line.closestPointTangent(t)}length(){return this.line.length()}divideAt(t){const e=this.line.divideAt(t);return[new Iy(e[0]),new Iy(e[1])]}divideAtLength(t){const e=this.line.divideAtLength(t);return[new Iy(e[0]),new Iy(e[1])]}getSubdivisions(){return[]}pointAt(t){return this.line.pointAt(t)}pointAtLength(t){return this.line.pointAtLength(t)}tangentAt(t){return this.line.tangentAt(t)}tangentAtLength(t){return this.line.tangentAtLength(t)}isDifferentiable(){return null!=this.previousSegment&&!this.start.equals(this.end)}clone(){return new Iy(this.end)}scale(t,e,n){return this.end.scale(t,e,n),this}rotate(t,e){return this.end.rotate(t,e),this}translate(t,e){return"number"===typeof t?this.end.translate(t,e):this.end.translate(t),this}equals(t){return this.type===t.type&&this.start.equals(t.start)&&this.end.equals(t.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){const t=this.end;return`${this.type} ${t.x} ${t.y}`}}(function(t){function e(...e){const n=e.length,i=e[0];if(Fy.isLine(i))return new t(i);if(jy.isPointLike(i))return 1===n?new t(i):e.map((e=>new t(e)));if(2===n)return new t(+e[0],+e[1]);const s=[];for(let r=0;r1&&(h=Math.sqrt(h),n*=h,i*=h);const y=n*n,b=i*i,v=(r===o?-1:1)*Math.sqrt(Math.abs((y*b-y*c*c-b*s*s)/(y*c*c+b*s*s)));f=v*n*c/i+(t+a)/2,m=v*-i*s/n+(e+l)/2,p=Math.asin((e-m)/i),g=Math.asin((l-m)/i),p=tg&&(p-=2*Math.PI),!o&&g>p&&(g-=2*Math.PI)}let b=g-p;if(Math.abs(b)>h){const t=g,e=a,r=l;g=p+h*(o&&g>p?1:-1),a=f+n*Math.cos(g),l=m+i*Math.sin(g),y=qy(a,l,n,i,s,0,o,e,r,[g,t,f,m])}b=g-p;const v=Math.cos(p),C=Math.sin(p),w=Math.cos(g),x=Math.sin(g),E=Math.tan(b/4),S=4/3*(n*E),A=4/3*(i*E),M=[t,e],k=[t+S*C,e-A*v],O=[a+S*x,l-A*w],P=[a,l];if(k[0]=2*M[0]-k[0],k[1]=2*M[1]-k[1],c)return[k,O,P].concat(y);{y=[k,O,P].concat(y).join().split(",");const t=[],e=y.length;for(let n=0;n{const o=[];let a=e.toLowerCase();n.replace(i,((t,e)=>(e&&o.push(+e),t))),"m"===a&&o.length>2&&(r.push([e,...o.splice(0,2)]),a="l",e="m"===e?"l":"L");const l=s[a];while(o.length>=l)if(r.push([e,...o.splice(0,l)]),!l)break;return t})),r}function Xy(t){const e=Wy(t);if(!e||!e.length)return[["M",0,0]];let n=0,i=0,s=0,r=0;const o=[];for(let a=0,l=e.length;a7){t[n].shift();const i=t[n];while(i.length)r[n]="A",n+=1,t.splice(n,0,["C"].concat(i.splice(0,6)));t.splice(n,1),a=e.length}}const r=[];let o="",a=e.length;for(let l=0;l0&&(o=r[l-1])),e[l]=i(e[l],n,o),"A"!==r[l]&&"C"===t&&(r[l]="C"),s(e,l);const a=e[l],c=a.length;n.x=a[c-2],n.y=a[c-1],n.bx=parseFloat(a[c-4])||n.x,n.by=parseFloat(a[c-3])||n.y}return e[0][0]&&"M"===e[0][0]||e.unshift(["M",0,0]),e}function Jy(t){return Yy(t).map((t=>t.map((t=>"string"===typeof t?t:My(t,2))))).join(",").split(",").join(" ")}(function(t){function e(...e){const n=e.length,i=e[0];if($y.isCurve(i))return new t(i);if(jy.isPointLike(i)){if(3===n)return new t(e[0],e[1],e[2]);const i=[];for(let s=0;s0,l=e||0;if(i&&a){t=t.slice();const e=t[0],n=new jy(o.x+(e.x-o.x)/2,o.y+(e.y-o.y)/2);t.splice(0,0,n)}let c=t[0],h=1;n?r.push("M",c.x,c.y):r.push("L",c.x,c.y);while(h<(i?t.length:t.length-1)){let e=t[Qy(h,t.length)],n=c.x-e.x,i=c.y-e.y;if(a&&(0!==n||0!==i)&&(null==s||s.indexOf(h-1)<0)){let s=Math.sqrt(n*n+i*i);const o=n*Math.min(l,s/2)/s,a=i*Math.min(l,s/2)/s,c=e.x+o,u=e.y+a;r.push("L",c,u);let d=t[Qy(h+1,t.length)];while(h"string"===typeof t?t:+t.toFixed(3))).join(" ")}function eb(t,e={}){const n=[];return t&&t.length&&t.forEach((t=>{Array.isArray(t)?n.push({x:t[0],y:t[1]}):n.push({x:t.x,y:t.y})})),tb(n,e.round,null==e.initialMove||e.initialMove,e.close,e.exclude)}function nb(t,e,n,i,s=0,r=0,o=0,a,l){if(0===n||0===i)return[];a-=t,l-=e,n=Math.abs(n),i=Math.abs(i);const c=-a/2,h=-l/2,u=Math.cos(s*Math.PI/180),d=Math.sin(s*Math.PI/180),p=u*c+d*h,g=-1*d*c+u*h,f=p*p,m=g*g,y=n*n,b=i*i,v=f/y+m/b;let C;if(v>1)n=Math.sqrt(v)*n,i=Math.sqrt(v)*i,C=0;else{let t=1;r===o&&(t=-1),C=t*Math.sqrt((y*b-y*m-b*f)/(y*m+b*f))}const w=C*n*g/i,x=-1*C*i*p/n,E=u*w-d*x+a/2,S=d*w+u*x+l/2;let A=Math.atan2((g-x)/i,(p-w)/n)-Math.atan2(0,1),M=A>=0?A:2*Math.PI+A;A=Math.atan2((-g-x)/i,(-p-w)/n)-Math.atan2((g-x)/i,(p-w)/n);let k=A>=0?A:2*Math.PI+A;0===o&&k>0?k-=2*Math.PI:0!==o&&k<0&&(k+=2*Math.PI);const O=2*k/Math.PI,P=Math.ceil(O<0?-1*O:O),T=k/P,D=8/3*Math.sin(T/4)*Math.sin(T/4)/Math.sin(T/2),N=u*n,j=u*i,L=d*n,F=d*i;let B=Math.cos(M),R=Math.sin(M),$=-D*(N*R+F*B),z=-D*(L*R-j*B),I=0,_=0;const V=[];for(let G=0;G+t.toFixed(2)))}function ib(t,e,n,i,s=0,r=0,o=0,a,l){const c=[],h=nb(t,e,n,i,s,r,o,a,l);if(null!=h)for(let u=0,d=h.length;u{0===n&&this.appendSegment(sb.createSegment("M",t.start)),null==e||e.end.equals(t.start)||this.appendSegment(sb.createSegment("M",t.start)),Fy.isLine(t)?this.appendSegment(sb.createSegment("L",t.end)):$y.isCurve(t)&&this.appendSegment(sb.createSegment("C",t.controlPoint1,t.controlPoint2,t.end)),e=t}))}else{const e=t;e.forEach((t=>{t.isSegment&&this.appendSegment(t)}))}else null!=t&&(Fy.isLine(t)?(this.appendSegment(sb.createSegment("M",t.start)),this.appendSegment(sb.createSegment("L",t.end))):$y.isCurve(t)?(this.appendSegment(sb.createSegment("M",t.start)),this.appendSegment(sb.createSegment("C",t.controlPoint1,t.controlPoint2,t.end))):Ry.isPolyline(t)?t.points&&t.points.length&&t.points.forEach(((t,e)=>{const n=0===e?sb.createSegment("M",t):sb.createSegment("L",t);this.appendSegment(n)})):t.isSegment&&this.appendSegment(t))}get[Symbol.toStringTag](){return sb.toStringTag}get start(){const t=this.segments,e=t.length;if(0===e)return null;for(let n=0;n=0;n-=1){const e=t[n];if(e.isVisible)return e.end}return t[e-1].end}moveTo(...t){return this.appendSegment(Vy.create.call(null,...t))}lineTo(...t){return this.appendSegment(Iy.create.call(null,...t))}curveTo(...t){return this.appendSegment(Gy.create.call(null,...t))}arcTo(t,e,n,i,s,r,o){const a=this.end||new jy,l="number"===typeof r?nb(a.x,a.y,t,e,n,i,s,r,o):nb(a.x,a.y,t,e,n,i,s,r.x,r.y);if(null!=l)for(let c=0,h=l.length;cn||t<0)throw new Error("Index out of range.");let i,s=null,r=null;if(0!==n&&(t>=1?(s=this.segments[t-1],r=s.nextSegment):(s=null,r=this.segments[0])),Array.isArray(e))for(let o=0,a=e.length;o=e||n<0)throw new Error("Index out of range.");return n}segmentAt(t,e={}){const n=this.segmentIndexAt(t,e);return n?this.getSegment(n):null}segmentAtLength(t,e={}){const n=this.segmentIndexAtLength(t,e);return n?this.getSegment(n):null}segmentIndexAt(t,e={}){if(0===this.segments.length)return null;const n=Oy(t,0,1),i=this.getOptions(e),s=this.length(i),r=s*n;return this.segmentIndexAtLength(r,i)}segmentIndexAtLength(t,e={}){const n=this.segments.length;if(0===n)return null;let i=!0;t<0&&(i=!1,t=-t);const s=this.getPrecision(e),r=this.getSubdivisions(e);let o=0,a=null;for(let l=0;l=1)return this.end.clone();const n=this.getOptions(e),i=this.length(n),s=i*t;return this.pointAtLength(s,n)}pointAtLength(t,e={}){if(0===this.segments.length)return null;if(0===t)return this.start.clone();let n=!0;t<0&&(n=!1,t=-t);const i=this.getPrecision(e),s=this.getSubdivisions(e);let r,o=0;for(let l=0,c=this.segments.length;l=n)return e[n-1].pointAtT(1);const s=Oy(t.value,0,1);return e[i].pointAtT(s)}divideAt(t,e={}){if(0===this.segments.length)return null;const n=Oy(t,0,1),i=this.getOptions(e),s=this.length(i),r=s*n;return this.divideAtLength(r,i)}divideAtLength(t,e={}){if(0===this.segments.length)return null;let n=!0;t<0&&(n=!1,t=-t);const i=this.getPrecision(e),s=this.getSubdivisions(e);let r,o,a,l,c,h=0;for(let C=0,w=this.segments.length;C=n&&(i=n-1,s=1);const r=this.getPrecision(e),o=this.getSubdivisions(e);let a=0;for(let h=0;h=e)return this.segments[e-1].tangentAtT(1);const i=Oy(t.value,0,1);return this.segments[n].tangentAtT(i)}getPrecision(t={}){return null==t.precision?this.PRECISION:t.precision}getSubdivisions(t={}){if(null==t.segmentSubdivisions){const e=this.getPrecision(t);return this.getSegmentSubdivisions({precision:e})}return t.segmentSubdivisions}getOptions(t={}){const e=this.getPrecision(t),n=this.getSubdivisions(t);return{precision:e,segmentSubdivisions:n}}toPoints(t={}){const e=this.segments,n=e.length;if(0===n)return null;const i=this.getSubdivisions(t),s=[];let r=[];for(let o=0;o0?e.forEach((t=>r.push(t.start))):r.push(t.start)}else r.length>0&&(r.push(e[o-1].end),s.push(r),r=[])}return r.length>0&&(r.push(this.end),s.push(r)),s}toPolylines(t={}){const e=this.toPoints(t);return e?e.map((t=>new Ry(t))):null}scale(t,e,n){return this.segments.forEach((i=>i.scale(t,e,n))),this}rotate(t,e){return this.segments.forEach((n=>n.rotate(t,e))),this}translate(t,e){return"number"===typeof t?this.segments.forEach((n=>n.translate(t,e))):this.segments.forEach((e=>e.translate(t))),this}clone(){const t=new sb;return this.segments.forEach((e=>t.appendSegment(e.clone()))),t}equals(t){if(null==t)return!1;const e=this.segments,n=t.segments,i=e.length;if(n.length!==i)return!1;for(let s=0;st.toJSON()))}serialize(){if(!this.isValid())throw new Error("Invalid path segments.");return this.segments.map((t=>t.serialize())).join(" ")}toString(){return this.serialize()}}(function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return!(null!=n&&n!==t.toStringTag||!Array.isArray(i.segments)||"function"!==typeof i.moveTo||"function"!==typeof i.lineTo||"function"!==typeof i.curveTo)}t.toStringTag=`X6.Geometry.${t.name}`,t.isPath=e})(sb||(sb={})),function(t){function e(e){if(!e)return new t;const i=new t,s=/(?:[a-zA-Z] *)(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)? *,? *)|(?:-?\.\d+ *,? *))+|(?:[a-zA-Z] *)(?! |\d|-|\.)/g,r=t.normalize(e).match(s);if(null!=r)for(let t=0,o=r.length;t+t)),s=n.call(null,t,...e);i.appendSegment(s)}}return i}function n(t,...e){if("M"===t)return Vy.create.call(null,...e);if("L"===t)return Iy.create.call(null,...e);if("C"===t)return Gy.create.call(null,...e);if("z"===t||"Z"===t)return _y.create();throw new Error(`Invalid path segment type "${t}"`)}t.parse=e,t.createSegment=n}(sb||(sb={})),function(t){t.normalize=Jy,t.isValid=Ky,t.drawArc=ib,t.drawPoints=eb,t.arcToCurves=nb}(sb||(sb={}));class rb{constructor(t,e,n){if(!t)throw new TypeError("Invalid element to create vector");let i;if(rb.isVector(t))i=t.node;else if("string"===typeof t)if("svg"===t.toLowerCase())i=Um();else if("<"===t[0]){const e=Um(t);i=document.importNode(e.firstChild,!0)}else i=document.createElementNS(Im.svg,t);else i=t;this.node=i,e&&this.setAttributes(e),n&&this.append(n)}get[Symbol.toStringTag](){return rb.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(t){this.node.id=t}transform(t,e){return null==t?rv(this.node):(rv(this.node,t,e),this)}translate(t,e=0,n={}){return null==t?ov(this.node):(ov(this.node,t,e,n),this)}rotate(t,e,n,i={}){return null==t?av(this.node):(av(this.node,t,e,n,i),this)}scale(t,e){return null==t?lv(this.node):(lv(this.node,t,e),this)}getTransformToElement(t){const e=rb.toNode(t);return Jb(this.node,e)}removeAttribute(t){return ay(this.node,t),this}getAttribute(t){return oy(this.node,t)}setAttribute(t,e){return ly(this.node,t,e),this}setAttributes(t){return cy(this.node,t),this}attr(t,e){return null==t?hy(this.node):"string"===typeof t&&void 0===e?hy(this.node,t):("object"===typeof t?hy(this.node,t):hy(this.node,t,e),this)}svg(){return this.node instanceof SVGSVGElement?this:rb.create(this.node.ownerSVGElement)}defs(){const t=this.svg()||this,e=t.node.getElementsByTagName("defs")[0];return e?rb.create(e):rb.create("defs").appendTo(t)}text(t,e={}){return ub(this.node,t,e),this}tagName(){return Wm(this.node)}clone(){return rb.create(this.node.cloneNode(!0))}remove(){return Qm(this.node),this}empty(){return ty(this.node),this}append(t){return ey(this.node,rb.toNodes(t)),this}appendTo(t){return sy(this.node,rb.isVector(t)?t.node:t),this}prepend(t){return ny(this.node,rb.toNodes(t)),this}before(t){return iy(this.node,rb.toNodes(t)),this}replace(t){return this.node.parentNode&&this.node.parentNode.replaceChild(rb.toNode(t),this.node),rb.create(t)}first(){return this.node.firstChild?rb.create(this.node.firstChild):null}last(){return this.node.lastChild?rb.create(this.node.lastChild):null}get(t){const e=this.node.childNodes[t];return e?rb.create(e):null}indexOf(t){const e=Array.prototype.slice.call(this.node.childNodes);return e.indexOf(rb.toNode(t))}find(t){const e=[],n=Ym(this.node,t);if(n)for(let i=0,s=n.length;ia&&(a=l)}else i&&h===c&&(r+=i),o=document.createTextNode(r||" "),s&&s>a&&(a=s);t.appendChild(o)}return a&&(l.maxFontSize=a),r?l.lineHeight=r:a&&(l.lineHeight=1.2*a),l}(function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return(null==n||n===t.toStringTag)&&i.node instanceof SVGElement&&"function"===typeof i.animate&&"function"===typeof i.sample&&"function"===typeof i.normalizePath&&"function"===typeof i.toPath}function n(e,n,i){return new t(e,n,i)}function i(t){if("<"===t[0]){const e=Um(t),i=[];for(let t=0,s=e.childNodes.length;ts(t))):[s(t)]}t.toStringTag=`X6.${t.name}`,t.isVector=e,t.create=n,t.createVectors=i,t.toNode=s,t.toNodes=r})(rb||(rb={}));const lb=/em$/;function cb(t,e){const n=parseFloat(t);return lb.test(t)?n*e:n}function hb(t,e,n,i){if(!Array.isArray(e))return 0;const s=e.length;if(!s)return 0;let r=e[0];const o=cb(r.maxFontSize,n)||n;let a=0;const l=cb(i,n);for(let u=1;u0&&e.setAttribute("dy",f),(E>0||s)&&e.setAttribute("x",a),e.className.baseVal=t,g.appendChild(e),b+=r.length+1}if(o)if(c)f=hb(r,C,m,d);else if("top"===r)f="0.8em";else{let t;switch(w>0?(t=parseFloat(d)||1,t*=w,lb.test(d)||(t/=m)):t=0,r){case"middle":f=.3-t/2+"em";break;case"bottom":f=-t-.3+"em";break;default:break}}else 0===r?f="0em":r?f=r:(f=0,null==t.getAttribute("y")&&t.setAttribute("y",`${y||"0.8em"}`));const x=g.firstChild;x.setAttribute("dy",f),t.appendChild(g)}function db(t,e,n,i){const s=[],r=[];if(null!=e){const n=t.split(e);if(s.push(...n),"string"===typeof e)for(let t=0,i=n.length-1;t=0&&t.length>1){const e=t.split(n);for(let t=0,s=e.length-1;t""!==t));s.splice(o,1,...i);const a=i.map((()=>""));a.pop(),r.splice(o,0,...a)}}for(let o=0;o0&&er){const t=Math.floor(r/b)-1,e=C[t],n=C[t+1];if(C.splice(t+1),null==e)break;let o=i.ellipsis;if(!o)break;"string"!==typeof o&&(o="…");let a=e;n&&g&&(a+=v+n);let h,u,p=a.length;do{if(u=a[p],h=a.substring(0,p),u?u.match(d)&&(h+=u):h+=m[t],h+=o,c.data=h,l.getComputedTextLength()<=s){C[t]=h;break}p-=1}while(p>=0);break}}}else f[A]=!0,A+=1,C[A]=""}return Qm(h?o:a),C.join(u)}const gb=.551784;function fb(t,e,n=NaN){const i=t.getAttribute(e);if(null==i)return n;const s=parseFloat(i);return Number.isNaN(s)?n:s}function mb(t,e=1){const n=t.getTotalLength(),i=[];let s,r=0;while(r`${t.x} ${t.y}`));return`M ${e.join(" L")}`}function wb(t){const e=[],n=t.points;if(n)for(let i=0,s=n.numberOfItems;i=s?r?`M0,${o}A${o},${o} 0 1,1 0,${-o}A${o},${o} 0 1,1 0,${o}M0,${r}A${r},${r} 0 1,0 0,${-r}A${r},${r} 0 1,0 0,${r}Z`:`M0,${o}A${o},${o} 0 1,1 0,${-o}A${o},${o} 0 1,1 0,${o}Z`:r?`M${o*u},${o*d}A${o},${o} 0 ${h},1 ${o*p},${o*g}L${r*p},${r*g}A${r},${r} 0 ${h},0 ${r*u},${r*d}Z`:`M${o*u},${o*d}A${o},${o} 0 ${h},1 ${o*p},${o*g}L0,0Z`}const Pb=Hm("svg"),Tb=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,Db=/[ ,]+/,Nb=/^(\w+)\((.*)\)/;function jb(t,e){const n=Pb.createSVGPoint();return n.x=t,n.y=e,n}function Lb(t){const e=Pb.createSVGMatrix();if(null!=t){const n=t,i=e;for(const t in n)i[t]=n[t]}return e}function Fb(t){return null!=t?(t instanceof DOMMatrix||(t=Lb(t)),Pb.createSVGTransformFromMatrix(t)):Pb.createSVGTransform()}function Bb(t){let e=Lb();const n=null!=t&&t.match(Tb);if(!n)return e;for(let i=0,s=n.length;i=0){const s=Bb(t),r=Ib(s);e=[r.translateX,r.translateY],n=[r.rotation],i=[r.scaleX,r.scaleY];const o=[];0===e[0]&&0===e[1]||o.push(`translate(${e.join(",")})`),1===i[0]&&1===i[1]||o.push(`scale(${i.join(",")})`),0!==n[0]&&o.push(`rotate(${n[0]})`),t=o.join(" ")}else{const r=t.match(/translate\((.*?)\)/);r&&(e=r[1].split(s));const o=t.match(/rotate\((.*?)\)/);o&&(n=o[1].split(s));const a=t.match(/scale\((.*?)\)/);a&&(i=a[1].split(s))}}const s=i&&i[0]?parseFloat(i[0]):1;return{raw:t||"",translation:{tx:e&&e[0]?parseInt(e[0],10):0,ty:e&&e[1]?parseInt(e[1],10):0},rotation:{angle:n&&n[0]?parseInt(n[0],10):0,cx:n&&n[1]?parseInt(n[1],10):void 0,cy:n&&n[2]?parseInt(n[2],10):void 0},scale:{sx:s,sy:i&&i[1]?parseFloat(i[1]):s}}}function zb(t,e){const n=e.x*t.a+e.y*t.c+0,i=e.x*t.b+e.y*t.d+0;return{x:n,y:i}}function Ib(t){const e=zb(t,{x:0,y:1}),n=zb(t,{x:1,y:0}),i=180/Math.PI*Math.atan2(e.y,e.x)-90,s=180/Math.PI*Math.atan2(n.y,n.x);return{skewX:i,skewY:s,translateX:t.e,translateY:t.f,scaleX:Math.sqrt(t.a*t.a+t.b*t.b),scaleY:Math.sqrt(t.c*t.c+t.d*t.d),rotation:i}}function _b(t){let e,n,i,s;return t?(e=null==t.a?1:t.a,s=null==t.d?1:t.d,n=t.b,i=t.c):e=s=1,{sx:n?Math.sqrt(e*e+n*n):e,sy:i?Math.sqrt(i*i+s*s):s}}function Vb(t){let e={x:0,y:1};return t&&(e=zb(t,e)),{angle:Ay.normalize(Ay.toDeg(Math.atan2(e.y,e.x))-90)}}function Gb(t){return{tx:t&&t.e||0,ty:t&&t.f||0}}function Hb(t,e){const n=jb(t.x,t.y).matrixTransform(e);return new jy(n.x,n.y)}function Ub(t,e){return new Fy(Hb(t.start,e),Hb(t.end,e))}function qb(t,e){const n=Pb.createSVGPoint();n.x=t.x,n.y=t.y;const i=n.matrixTransform(e);n.x=t.x+t.width,n.y=t.y;const s=n.matrixTransform(e);n.x=t.x+t.width,n.y=t.y+t.height;const r=n.matrixTransform(e);n.x=t.x,n.y=t.y+t.height;const o=n.matrixTransform(e),a=Math.min(i.x,s.x,r.x,o.x),l=Math.max(i.x,s.x,r.x,o.x),c=Math.min(i.y,s.y,r.y,o.y),h=Math.max(i.y,s.y,r.y,o.y);return new Ly(a,c,l-a,h-c)}var Wb=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{const n=t.getAttribute(e),i=n?parseFloat(n):0;return Number.isNaN(i)?0:i};switch(t instanceof SVGElement&&t.nodeName.toLowerCase()){case"rect":return new Ly(e("x"),e("y"),e("width"),e("height"));case"circle":return new By(e("cx"),e("cy"),e("r"),e("r"));case"ellipse":return new By(e("cx"),e("cy"),e("rx"),e("ry"));case"polyline":{const e=wb(t);return new Ry(e)}case"polygon":{const e=wb(t);return e.length>1&&e.push(e[0]),new Ry(e)}case"path":{let e=t.getAttribute("d");return sb.isValid(e)||(e=sb.normalize(e)),sb.parse(e)}case"line":return new Fy(e("x1"),e("y1"),e("x2"),e("y2"));default:break}return Yb(t)}function Qb(t,e){return ev(t,e,"animate")}function tv(t,e){return ev(t,e,"animateTransform")}function ev(t,e,n){const i=Hm(n);t.appendChild(i);try{return nv(i,e)}catch(s){}return()=>{}}function nv(t,e){const{start:n,complete:i,repeat:s}=e,r=Wb(e,["start","complete","repeat"]);hy(t,r),n&&t.addEventListener("beginEvent",n),i&&t.addEventListener("endEvent",i),s&&t.addEventListener("repeatEvent",s);const o=t;return o.beginElement(),()=>o.endElement()}function iv(t,e,n){const i=$m(n),s=Hm("animateMotion"),r=Hm("mpath");hy(r,{"xlink:href":`#${i}`}),s.appendChild(r),t.appendChild(s);try{return nv(s,e)}catch(o){if("fake"===document.documentElement.getAttribute("smiling")){const t=s;t.animators=[];const e=window,n=t.getAttribute("id");n&&(e.id2anim[n]=t);const i=e.getTargets(t);for(let s=0,r=i.length;s{}}function sv(t){let e=0,n=0,i=0,s=0;if(t){let r=t;while(r)e+=r.offsetLeft,n+=r.offsetTop,r=r.offsetParent,r&&(e+=parseInt(Sy(r,"borderLeft"),10),n+=parseInt(Sy(r,"borderTop"),10));i=t.offsetWidth,s=t.offsetHeight}return{left:e,top:n,width:i,height:s}}function rv(t,e,n={}){if(null==e)return Bb(hy(t,"transform"));if(n.absolute)return void t.setAttribute("transform",Rb(e));const i=t.transform,s=Fb(e);i.baseVal.appendItem(s)}function ov(t,e,n=0,i={}){let s=hy(t,"transform");const r=$b(s);if(null==e)return r.translation;s=r.raw,s=s.replace(/translate\([^)]*\)/g,"").trim();const o=i.absolute?e:r.translation.tx+e,a=i.absolute?n:r.translation.ty+n,l=`translate(${o},${a})`;t.setAttribute("transform",`${l} ${s}`.trim())}function av(t,e,n,i,s={}){let r=hy(t,"transform");const o=$b(r);if(null==e)return o.rotation;r=o.raw,r=r.replace(/rotate\([^)]*\)/g,"").trim(),e%=360;const a=s.absolute?e:o.rotation.angle+e,l=null!=n&&null!=i?`,${n},${i}`:"",c=`rotate(${a}${l})`;t.setAttribute("transform",`${r} ${c}`.trim())}function lv(t,e,n){let i=hy(t,"transform");const s=$b(i);if(null==e)return s.scale;n=null==n?e:n,i=s.raw,i=i.replace(/scale\([^)]*\)/g,"").trim();const r=`scale(${e},${n})`;t.setAttribute("transform",`${i} ${r}`.trim())}function cv(t,e,n,i){const s=jy.create(e),r=jy.create(n);if(!i){const e=t instanceof SVGSVGElement?t:t.ownerSVGElement;i=e}const o=lv(t);t.setAttribute("transform","");const a=Yb(t,{target:i}).scale(o.sx,o.sy),l=Fb();l.setTranslate(-a.x-a.width/2,-a.y-a.height/2);const c=Fb(),h=s.angleBetween(r,s.clone().translate(1,0));h&&c.setRotate(h,0,0);const u=Fb(),d=s.clone().move(r,a.width/2);u.setTranslate(2*s.x-d.x,2*s.y-d.y);const p=Jb(t,i),g=Fb();g.setMatrix(u.matrix.multiply(c.matrix.multiply(l.matrix.multiply(p.scale(o.sx,o.sy))))),t.setAttribute("transform",Rb(g.matrix))}class hv{constructor(t,e,n){this.animationFrameId=0,this.deltaX=0,this.deltaY=0,this.eventName=w.isEventSupported("wheel")?"wheel":"mousewheel",this.target=t,this.onWheelCallback=e,this.onWheelGuard=n,this.onWheel=this.onWheel.bind(this),this.didWheel=this.didWheel.bind(this)}enable(){w.SUPPORT_PASSIVE?this.target.addEventListener(this.eventName,this.onWheel,{passive:!1}):v()(this.target).on("mousewheel",this.onWheel)}disable(){w.SUPPORT_PASSIVE?this.target.removeEventListener(this.eventName,this.onWheel):v()(this.target).off("mousewheel")}onWheel(t){if(null!=this.onWheelGuard&&!this.onWheelGuard(t))return;let e;this.deltaX+=t.deltaX,this.deltaY+=t.deltaY,t.preventDefault(),0===this.deltaX&&0===this.deltaY||(t.stopPropagation(),e=!0),!0===e&&0===this.animationFrameId&&(this.animationFrameId=requestAnimationFrame((()=>{this.didWheel(t)})))}didWheel(t){this.animationFrameId=0,this.onWheelCallback(t,this.deltaX,this.deltaY),this.deltaX=0,this.deltaY=0}}rb.isVector,rb.create,rb.createVectors;function uv(t,e=60){let n=null;return(...i)=>{n&&clearTimeout(n),n=window.setTimeout((()=>{t.apply(this,i)}),e)}}function dv(t){let e=null,n=[];const i=()=>{if("static"===getComputedStyle(t).position){const e=t.style;e.position="relative"}const e=document.createElement("object");return e.onload=()=>{e.contentDocument.defaultView.addEventListener("resize",s),s()},e.style.display="block",e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.height="100%",e.style.width="100%",e.style.overflow="hidden",e.style.pointerEvents="none",e.style.zIndex="-1",e.style.opacity="0",e.setAttribute("tabindex","-1"),e.type="text/html",t.appendChild(e),e.data="about:blank",e},s=uv((()=>{n.forEach((e=>e(t)))})),r=t=>{e||(e=i()),-1===n.indexOf(t)&&n.push(t)},o=()=>{e&&e.parentNode&&(e.contentDocument&&e.contentDocument.defaultView.removeEventListener("resize",s),e.parentNode.removeChild(e),e=null,n=[])},a=t=>{const i=n.indexOf(t);-1!==i&&n.splice(i,1),0===n.length&&e&&o()};return{element:t,bind:r,destroy:o,unbind:a}}function pv(t){let e=null,n=[];const i=uv((()=>{n.forEach((e=>{e(t)}))})),s=()=>{const e=new ResizeObserver(i);return e.observe(t),i(),e},r=t=>{e||(e=s()),-1===n.indexOf(t)&&n.push(t)},o=()=>{e&&(e.disconnect(),n=[],e=null)},a=t=>{const i=n.indexOf(t);-1!==i&&n.splice(i,1),0===n.length&&e&&o()};return{element:t,bind:r,destroy:o,unbind:a}}const gv="undefined"!==typeof ResizeObserver?pv:dv;var fv,mv;(function(t){const e=new WeakMap;function n(t){let n=e.get(t);return n||(n=gv(t),e.set(t,n),n)}function i(t){t.destroy(),e.delete(t.element)}t.bind=(t,e)=>{const i=n(t);return i.bind(e),()=>i.unbind(e)},t.clear=t=>{const e=n(t);i(e)}})(fv||(fv={})),function(t){const e=[],n=1e3/60,i=[];let s=0;const r=()=>performance.now(),o=t=>t[0],a=t=>1===i.push(t)&&l(),l=(()=>{const t=()=>i.splice(0,i.length).forEach((t=>t()));if("undefined"!==typeof MessageChannel){const{port1:e,port2:n}=new MessageChannel;return e.onmessage=t,()=>n.postMessage(null)}return()=>setTimeout(t)})(),c=()=>{s=r()+n;let i=o(e);while(i&&!t.shouldYield()){const{callback:t,data:n}=i;i.callback=null;const s=t&&t(n);s?i.callback=s:e.shift(),i=o(e)}i&&a(c)};t.scheduleTask=(t,n)=>{const i={callback:t,data:n};e.push(i),a(c)},t.shouldYield=()=>{var t,e;return(null===(e=null===(t=navigator)||void 0===t?void 0:t.scheduling)||void 0===e?void 0:e.isInputPending())||r()>=s}}(mv||(mv={}));class yv{constructor(t){this.options=Object.assign({},t),this.data=this.options.data||{},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this)}get names(){return Object.keys(this.data)}register(t,e,n=!1){if("object"===typeof t)return void Object.keys(t).forEach((n=>{this.register(n,t[n],e)}));!this.exist(t)||n||w.isApplyingHMR()||this.onDuplicated(t);const i=this.options.process,s=i?Em(i,this,t,e):e;return this.data[t]=s,s}unregister(t){const e=t?this.data[t]:null;return delete this.data[t],e}get(t){return t?this.data[t]:null}exist(t){return!!t&&null!=this.data[t]}onDuplicated(t){try{throw this.options.onConflict&&Em(this.options.onConflict,this,t),new Error(`${jf(this.options.type)} with name '${t}' already registered.`)}catch(e){throw e}}onNotFound(t,e){throw new Error(this.getSpellingSuggestion(t,e))}getSpellingSuggestion(t,e){const n=this.getSpellingSuggestionForName(t),i=e?`${e} ${Uf(this.options.type)}`:this.options.type;return`${jf(i)} with name '${t}' does not exist.${n?` Did you mean '${n}'?`:""}`}getSpellingSuggestionForName(t){return Kf(t,Object.keys(this.data),(t=>t))}}(function(t){function e(e){return new t(e)}t.create=e})(yv||(yv={}));const bv={xlinkHref:"xlink:href",xlinkShow:"xlink:show",xlinkRole:"xlink:role",xlinkType:"xlink:type",xlinkArcrole:"xlink:arcrole",xlinkTitle:"xlink:title",xlinkActuate:"xlink:actuate",xmlSpace:"xml:space",xmlBase:"xml:base",xmlLang:"xml:lang",preserveAspectRatio:"preserveAspectRatio",requiredExtension:"requiredExtension",requiredFeatures:"requiredFeatures",systemLanguage:"systemLanguage",externalResourcesRequired:"externalResourceRequired"},vv={},Cv={position:Gv("x","width","origin")},wv={position:Gv("y","height","origin")},xv={position:Gv("x","width","corner")},Ev={position:Gv("y","height","corner")},Sv={set:Hv("width","width")},Av={set:Hv("height","height")},Mv={set:Hv("rx","width")},kv={set:Hv("ry","height")},Ov={set:(t=>{const e=Hv(t,"width"),n=Hv(t,"height");return function(t,i){const s=i.refBBox,r=s.height>s.width?e:n;return Em(r,this,t,i)}})("r")},Pv={set(t,{refBBox:e}){let n=parseFloat(t);const i=om(t);i&&(n/=100);const s=Math.sqrt(e.height*e.height+e.width*e.width);let r;return Number.isFinite(n)&&(r=i||n>=0&&n<=1?n*s:Math.max(n+s,0)),{r:r}}},Tv={set:Hv("cx","width")},Dv={set:Hv("cy","height")},Nv={set:qv({resetOffset:!0})},jv={set:qv({resetOffset:!1})},Lv={set:Wv({resetOffset:!0})},Fv={set:Wv({resetOffset:!1})},Bv=Ov,Rv=Nv,$v=Lv,zv=Cv,Iv=wv,_v=Sv,Vv=Av;function Gv(t,e,n){return(i,{refBBox:s})=>{if(null==i)return null;let r=parseFloat(i);const o=om(i);let a;if(o&&(r/=100),Number.isFinite(r)){const i=s[n];a=o||r>0&&r<1?i[t]+s[e]*r:i[t]+r}const l=new jy;return l[t]=a||0,l}}function Hv(t,e){return function(n,{refBBox:i}){let s=parseFloat(n);const r=om(n);r&&(s/=100);const o={};if(Number.isFinite(s)){const n=r||s>=0&&s<=1?s*i[e]:Math.max(s+i[e],0);o[t]=n}return o}}function Uv(t,e){const n="x6-shape",i=e&&e.resetOffset;return function(e,{view:s,elem:r,refBBox:o}){const a=s.$(r);let l=a.data(n);if(!l||l.value!==e){const i=t(e);l={value:e,shape:i,shapeBBox:i.bbox()},a.data(n,l)}const c=l.shape.clone(),h=l.shapeBBox.clone(),u=h.getOrigin(),d=o.getOrigin();h.x=d.x,h.y=d.y;const p=o.getMaxScaleToFit(h,d),g=0===h.width||0===o.width?1:p.sx,f=0===h.height||0===o.height?1:p.sy;return c.scale(g,f,u),i&&c.translate(-u.x,-u.y),c}}function qv(t){function e(t){return sb.parse(t)}const n=Uv(e,t);return(t,e)=>{const i=n(t,e);return{d:i.serialize()}}}function Wv(t){const e=Uv((t=>new Ry(t)),t);return(t,n)=>{const i=e(t,n);return{points:i.serialize()}}}const Xv={qualify:pc,set(t,{view:e}){return`url(#${e.graph.defineGradient(t)})`}},Yv={qualify:pc,set(t,{view:e}){const n=e.cell,i=Object.assign({},t);if(n.isEdge()&&"linearGradient"===i.type){const t=e,s=t.sourcePoint,r=t.targetPoint;i.id=`gradient-${i.type}-${n.id}`,i.attrs=Object.assign(Object.assign({},i.attrs),{x1:s.x,y1:s.y,x2:r.x,y2:r.y,gradientUnits:"userSpaceOnUse"}),e.graph.defs.remove(i.id)}return`url(#${e.graph.defineGradient(i)})`}},Jv={qualify(t,{attrs:e}){return null==e.textWrap||!pc(e.textWrap)},set(t,{view:e,elem:n,attrs:i}){const s="x6-text",r=e.$(n),o=r.data(s),a=t=>{try{return JSON.parse(t)}catch(e){return t}},l={x:i.x,eol:i.eol,annotations:a(i.annotations),textPath:a(i["text-path"]||i.textPath),textVerticalAnchor:i["text-vertical-anchor"]||i.textVerticalAnchor,displayEmpty:"true"===(i["display-empty"]||i.displayEmpty),lineHeight:i["line-height"]||i.lineHeight},c=i["font-size"]||i.fontSize,h=JSON.stringify([t,l]);if(c&&n.setAttribute("font-size",c),null==o||o!==h){const i=l.textPath;if(null!=i&&"object"===typeof i){const t=i.selector;if("string"===typeof t){const n=e.find(t)[0];n instanceof SVGPathElement&&($m(n),l.textPath=Object.assign({"xlink:href":`#${n.id}`},i))}}ub(n,`${t}`,l),r.data(s,h)}}},Zv={qualify:pc,set(t,{view:e,elem:n,attrs:i,refBBox:s}){const r=t,o=r.width||0;om(o)?s.width*=parseFloat(o)/100:o<=0?s.width+=o:s.width=o;const a=r.height||0;let l;om(a)?s.height*=parseFloat(a)/100:a<=0?s.height+=a:s.height=a;let c=r.text;null==c&&(c=i.text),l=null!=c?pb(`${c}`,s,{"font-weight":i["font-weight"]||i.fontWeight,"font-size":i["font-size"]||i.fontSize,"font-family":i["font-family"]||i.fontFamily,lineHeight:i.lineHeight},{svgDocument:e.graph.view.svg,ellipsis:r.ellipsis,hyphen:r.hyphen,breakWord:r.breakWord}):"",Em(Jv.set,this,l,{view:e,elem:n,attrs:i,refBBox:s,cell:e.cell})}},Kv=(t,{attrs:e})=>void 0!==e.text,Qv={qualify:Kv},tC={qualify:Kv},eC={qualify:Kv},nC={qualify:Kv},iC={qualify:Kv},sC={qualify:Kv},rC={qualify(t,{elem:e}){return e instanceof SVGElement},set(t,{view:e,elem:n}){const i="x6-title",s=`${t}`,r=e.$(n),o=r.data(i);if(null==o||o!==s){r.data(i,s);const t=n.firstChild;if(t&&"TITLE"===t.tagName.toUpperCase()){const e=t;e.textContent=s}else{const e=document.createElementNS(n.namespaceURI,"title");e.textContent=s,n.insertBefore(e,t)}}}},oC={offset:cC("x","width","right")},aC={offset:cC("y","height","bottom")},lC={offset(t,{refBBox:e}){return t?{x:-e.x,y:-e.y}:{x:0,y:0}}};function cC(t,e,n){return(i,{refBBox:s})=>{const r=new jy;let o;return o="middle"===i?s[e]/2:i===n?s[e]:"number"===typeof i&&Number.isFinite(i)?i>-1&&i<1?-s[e]*i:-i:om(i)?s[e]*parseFloat(i)/100:0,r[t]=-(s[t]+o),r}}const hC={qualify:pc,set(t,{view:e,elem:n}){e.$(n).css(t)}},uC={set(t,{view:e,elem:n}){e.$(n).html(`${t}`)}},dC={qualify:pc,set(t,{view:e}){return`url(#${e.graph.defineFilter(t)})`}},pC={set(t){return null!=t&&"object"===typeof t&&t.id?t.id:t}};function gC(t,e,n){let i,s;"object"===typeof e?(i=e.x,s=e.y):(i=e,s=n);const r=sb.parse(t),o=r.bbox();if(o){let t=-o.height/2-o.y,e=-o.width/2-o.x;"number"===typeof i&&(e-=i),"number"===typeof s&&(t-=s),r.translate(e,t)}return r.serialize()}var fC=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{var{size:e,width:n,height:i,offset:s,open:r}=t,o=fC(t,["size","width","height","offset","open"]);return bC({size:e,width:n,height:i,offset:s},!0===r,!0,void 0,o)},yC=t=>{var{size:e,width:n,height:i,offset:s,factor:r}=t,o=fC(t,["size","width","height","offset","factor"]);return bC({size:e,width:n,height:i,offset:s},!1,!1,r,o)};function bC(t,e,n,i=3/4,s={}){const r=t.size||10,o=t.width||r,a=t.height||r,l=new sb,c={};if(e)l.moveTo(o,0).lineTo(0,a/2).lineTo(o,a),c.fill="none";else{if(l.moveTo(0,a/2),l.lineTo(o,0),!n){const t=sm(i,0,1);l.lineTo(o*t,a/2)}l.lineTo(o,a),l.close()}return Object.assign(Object.assign(Object.assign({},c),s),{tagName:"path",d:gC(l.serialize(),{x:null!=t.offset?t.offset:-o/2})})}var vC=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{var{size:e,width:n,height:i,offset:s}=t,r=vC(t,["size","width","height","offset"]);const o=e||10,a=n||o,l=i||o,c=new sb;return c.moveTo(0,l/2).lineTo(a/2,0).lineTo(a,l/2).lineTo(a/2,l).close(),Object.assign(Object.assign({},r),{tagName:"path",d:gC(c.serialize(),null==s?-a/2:s)})};var wC=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{var{d:e,offsetX:n,offsetY:i}=t,s=wC(t,["d","offsetX","offsetY"]);return Object.assign(Object.assign({},s),{tagName:"path",d:gC(e,n,i)})};var EC=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{var{size:e,width:n,height:i,offset:s}=t,r=EC(t,["size","width","height","offset"]);const o=e||10,a=n||o,l=i||o,c=new sb;return c.moveTo(0,0).lineTo(a,l).moveTo(0,l).lineTo(a,0),Object.assign(Object.assign({},r),{tagName:"path",fill:"none",d:gC(c.serialize(),s||-a/2)})};var AC=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{var{width:e,height:n,offset:i,open:s,flip:r}=t,o=AC(t,["width","height","offset","open","flip"]);let a=n||6;const l=e||10,c=!0===s,h=!0===r,u=Object.assign(Object.assign({},o),{tagName:"path"});h&&(a=-a);const d=new sb;return d.moveTo(0,a).lineTo(l,0),c?u.fill="none":(d.lineTo(l,a),d.close()),u.d=gC(d.serialize(),{x:i||-l/2,y:a/2}),u};var kC=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{var{r:e}=t,n=kC(t,["r"]);const i=e||5;return Object.assign(Object.assign({cx:i},n),{tagName:"circle",r:i})},PC=t=>{var{r:e}=t,n=kC(t,["r"]);const i=e||5,s=new sb;return s.moveTo(i,0).lineTo(i,2*i),s.moveTo(0,i).lineTo(2*i,i),{children:[Object.assign(Object.assign({},OC({r:i})),{fill:"none"}),Object.assign(Object.assign({},n),{tagName:"path",d:gC(s.serialize(),-i)})]}};var TC=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{var{rx:e,ry:n}=t,i=TC(t,["rx","ry"]);const s=e||5,r=n||5;return Object.assign(Object.assign({cx:s},i),{tagName:"ellipse",rx:s,ry:r})};var NC;(function(t){t.presets=i,t.registry=yv.create({type:"marker"}),t.registry.register(t.presets,!0)})(NC||(NC={})),function(t){t.normalize=gC}(NC||(NC={}));var jC=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s1){const t=Math.ceil(i/2);n.refX="marker-start"===e?t:-t}}return n}const IC=(t,{view:e})=>e.cell.isEdge(),_C={qualify:IC,set(t,e){const n=e.view,i=t.stubs||0;let s;if(Number.isFinite(i)&&0!==i){let t;if(i<0){const e=n.getConnectionLength()||0;t=(e+i)/2}else t=i;const e=n.getConnection();if(e){const n=e.divideAtLength(t),i=e.divideAtLength(-t);n&&i&&(s=`${n[0].serialize()} ${i[1].serialize()}`)}}return{d:s||n.getConnectionPathData()}}},VC={qualify:IC,set:XC("getTangentAtLength",{rotate:!0})},GC={qualify:IC,set:XC("getTangentAtLength",{rotate:!1})},HC={qualify:IC,set:XC("getTangentAtRatio",{rotate:!0})},UC={qualify:IC,set:XC("getTangentAtRatio",{rotate:!1})},qC=VC,WC=HC;function XC(t,e){const n={x:1,y:0};return(i,s)=>{let r,o;const a=s.view,l=a[t](Number(i));return l?(o=e.rotate?l.vector().vectorAngle(n):0,r=l.start):(r=a.path.start,o=0),0===o?{transform:`translate(${r.x},${r.y}')`}:{transform:`translate(${r.x},${r.y}') rotate(${o})`}}}var YC;(function(t){function e(t,e,n){if(null!=t){if("string"===typeof t)return!0;if("function"!==typeof t.qualify||Em(t.qualify,this,e,n))return!0}return!1}t.isValidDefinition=e})(YC||(YC={})),function(t){t.presets=Object.assign(Object.assign({},bv),s),t.registry=yv.create({type:"attribute definition"}),t.registry.register(t.presets,!0)}(YC||(YC={}));const JC={color:"#aaaaaa",thickness:1,markup:"rect",update(t,e){const n=e.thickness*e.sx,i=e.thickness*e.sy;hy(t,{width:n,height:i,rx:n,ry:i,fill:e.color})}},ZC={color:"#aaaaaa",thickness:1,markup:"rect",update(t,e){const n=e.sx<=1?e.thickness*e.sx:e.thickness;hy(t,{width:n,height:n,rx:n,ry:n,fill:e.color})}},KC={color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(t,e){let n;const i=e.width,s=e.height,r=e.thickness;n=i-r>=0&&s-r>=0?["M",i,0,"H0 M0 0 V0",s].join(" "):"M 0 0 0 0",hy(t,{d:n,stroke:e.color,"stroke-width":e.thickness})}},QC=[{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(t,e){let n;const i=e.width,s=e.height,r=e.thickness;n=i-r>=0&&s-r>=0?["M",i,0,"H0 M0 0 V0",s].join(" "):"M 0 0 0 0",hy(t,{d:n,stroke:e.color,"stroke-width":e.thickness})}},{color:"rgba(224,224,224,0.2)",thickness:3,factor:4,markup:"path",update(t,e){let n;const i=e.factor||1,s=e.width*i,r=e.height*i,o=e.thickness;n=s-o>=0&&r-o>=0?["M",s,0,"H0 M0 0 V0",r].join(" "):"M 0 0 0 0",e.width=s,e.height=r,hy(t,{d:n,stroke:e.color,"stroke-width":e.thickness})}}];class tw{constructor(){this.patterns={},this.root=rb.create(Um(),{width:"100%",height:"100%"},[Hm("defs")]).node}add(t,e){const n=this.root.childNodes[0];n&&n.appendChild(e),this.patterns[t]=e,rb.create("rect",{width:"100%",height:"100%",fill:`url(#${t})`}).appendTo(this.root)}get(t){return this.patterns[t]}has(t){return null!=this.patterns[t]}}function ew(t,e){return null!=t?t:e}function nw(t,e){return null!=t&&Number.isFinite(t)?t:e}function iw(t={}){const e=ew(t.color,"blue"),n=nw(t.width,1),i=nw(t.margin,2),s=nw(t.opacity,1),r=i,o=i+n;return`\n \n \n \n \n \n \n \n \n \n \n \n `.trim()}function sw(t={}){const e=ew(t.color,"red"),n=nw(t.blur,0),i=nw(t.width,1),s=nw(t.opacity,1);return`\n \n \n \n \n \n \n \n `.trim()}function rw(t={}){const e=nw(t.x,2),n=null!=t.y&&Number.isFinite(t.y)?[e,t.y]:e;return`\n \n \n \n `.trim()}function ow(t={}){const e=nw(t.dx,0),n=nw(t.dy,0),i=ew(t.color,"black"),s=nw(t.blur,4),r=nw(t.opacity,1);return"SVGFEDropShadowElement"in window?`\n \n `.trim():`\n \n \n \n \n \n \n \n \n \n \n \n `.trim()}function aw(t={}){const e=nw(t.amount,1),n=.2126+.7874*(1-e),i=.7152-.7152*(1-e),s=.0722-.0722*(1-e),r=.2126-.2126*(1-e),o=.7152+.2848*(1-e),a=.0722-.0722*(1-e),l=.2126-.2126*(1-e),c=.0722+.9278*(1-e);return`\n \n \n \n `.trim()}function lw(t={}){const e=nw(t.amount,1),n=.393+.607*(1-e),i=.769-.769*(1-e),s=.189-.189*(1-e),r=.349-.349*(1-e),o=.686+.314*(1-e),a=.168-.168*(1-e),l=.272-.272*(1-e),c=.534-.534*(1-e),h=.131+.869*(1-e);return`\n \n \n \n `.trim()}function cw(t={}){const e=nw(t.amount,1);return`\n \n \n \n `.trim()}function hw(t={}){const e=nw(t.angle,0);return`\n \n \n \n `.trim()}function uw(t={}){const e=nw(t.amount,1),n=1-e;return`\n \n \n \n \n \n \n \n `.trim()}function dw(t={}){const e=nw(t.amount,1);return`\n \n \n \n \n \n \n \n `.trim()}function pw(t={}){const e=nw(t.amount,1),n=.5-e/2;return`\n \n \n \n \n \n \n \n `.trim()}var gw;(function(t){t.presets=r,t.registry=yv.create({type:"grid"}),t.registry.register(t.presets,!0)})(tw||(tw={})),function(t){t.presets=o,t.registry=yv.create({type:"filter"}),t.registry.register(t.presets,!0)}(gw||(gw={}));const fw=function(t){const e=document.createElement("canvas"),n=t.width,i=t.height;e.width=2*n,e.height=i;const s=e.getContext("2d");return s.drawImage(t,0,0,n,i),s.translate(2*n,0),s.scale(-1,1),s.drawImage(t,0,0,n,i),e},mw=function(t){const e=document.createElement("canvas"),n=t.width,i=t.height;e.width=n,e.height=2*i;const s=e.getContext("2d");return s.drawImage(t,0,0,n,i),s.translate(0,2*i),s.scale(1,-1),s.drawImage(t,0,0,n,i),e},yw=function(t){const e=document.createElement("canvas"),n=t.width,i=t.height;e.width=2*n,e.height=2*i;const s=e.getContext("2d");return s.drawImage(t,0,0,n,i),s.setTransform(-1,0,0,-1,e.width,e.height),s.drawImage(t,0,0,n,i),s.setTransform(-1,0,0,1,e.width,0),s.drawImage(t,0,0,n,i),s.setTransform(1,0,0,-1,0,e.height),s.drawImage(t,0,0,n,i),e},bw=function(t,e){const n=t.width,i=t.height,s=document.createElement("canvas");s.width=3*n,s.height=3*i;const r=s.getContext("2d"),o=null!=e.angle?-e.angle:-20,a=Ay.toRad(o),l=s.width/4,c=s.height/4;for(let h=0;h<4;h+=1)for(let e=0;e<4;e+=1)(h+e)%2>0&&(r.setTransform(1,0,0,1,(2*h-1)*l,(2*e-1)*c),r.rotate(a),r.drawImage(t,-n/2,-i/2,n,i));return s};var vw;(function(t){t.presets=Object.assign({},a),t.presets["flip-x"]=fw,t.presets["flip-y"]=mw,t.presets["flip-xy"]=yw,t.registry=yv.create({type:"background pattern"}),t.registry.register(t.presets,!0)})(vw||(vw={}));const Cw={prefixCls:"x6",autoInsertCSS:!0,useCSSSelector:!0,trackable:!1,trackInfo:{},track(t){Cw.trackable=t}};var ww;(function(t){function e(t){return`${Cw.prefixCls}-${t}`}t.snapToGrid=Py,t.normalizeMarker=gC,t.prefix=e})(ww||(ww={})),function(t){function e(t,e,n,i=[]){const s="function"===typeof e.children?e.children(t):t[e.children||"children"];return n||(n=e.createNode(t),i.push(n)),Array.isArray(s)&&s.forEach((t=>{const s=e.createNode(t),r=e.createEdge(n,s);i.push(s,r),this.makeTree(t,e,s,i)})),i}t.makeTree=e}(ww||(ww={}));const xw=ww.prefix("highlighted"),Ew={highlight(t,e,n){const i=n&&n.className||xw;jm(e,i)},unhighlight(t,e,n){const i=n&&n.className||xw;Lm(e,i)}},Sw=ww.prefix("highlight-opacity"),Aw={highlight(t,e){jm(e,Sw)},unhighlight(t,e){Lm(e,Sw)}},Mw={padding:3,rx:0,ry:0,attrs:{"stroke-width":3,stroke:"#FEB663"}},kw={highlight(t,e,n){const i=Ow.getHighlighterId(e,n);if(Ow.hasCache(i))return;n=Ru({},n,Mw);const s=rb.create(e);let r,o;try{r=s.toPathData()}catch(h){o=s.bbox(!0),r=Ab(Object.assign(Object.assign({},n),o))}const a=Hm("path");if(hy(a,Object.assign({d:r,"pointer-events":"none","vector-effect":"non-scaling-stroke",fill:"none"},n.attrs?dy(n.attrs):null)),t.isEdgeElement(e))hy(a,"d",t.getConnectionPathData());else{let e=s.getTransformToElement(t.container);const i=n.padding;if(i){null==o&&(o=s.bbox(!0));const t=o.x+o.width/2,n=o.y+o.height/2;o=qb(o,e);const r=Math.max(o.width,1),a=Math.max(o.height,1),l=(r+i)/r,c=(a+i)/a,h=Lb({a:l,b:0,c:0,d:c,e:t-l*t,f:n-c*n});e=e.multiply(h)}rv(a,e)}jm(a,ww.prefix("highlight-stroke"));const l=t.cell,c=()=>Ow.removeHighlighter(i);l.on("removed",c),l.model&&l.model.on("reseted",c),t.container.appendChild(a),Ow.setCache(i,a)},unhighlight(t,e,n){Ow.removeHighlighter(Ow.getHighlighterId(e,n))}};var Ow,Pw;function Tw(t,e={}){return new jy(am(e.x,t.width),am(e.y,t.height))}function Dw(t,e,n){return Object.assign({angle:e,position:t.toJSON()},n)}(function(t){function e(t,e){return $m(t),t.id+JSON.stringify(e)}t.getHighlighterId=e;const n={};function i(t,e){n[t]=e}function s(t){return null!=n[t]}function r(t){const e=n[t];e&&(Qm(e),delete n[t])}t.setCache=i,t.hasCache=s,t.removeHighlighter=r})(Ow||(Ow={})),function(t){function e(t,e){if("function"!==typeof e.highlight)throw new Error(`Highlighter '${t}' is missing required \`highlight()\` method`);if("function"!==typeof e.unhighlight)throw new Error(`Highlighter '${t}' is missing required \`unhighlight()\` method`)}t.check=e}(Pw||(Pw={})),function(t){t.presets=l,t.registry=yv.create({type:"highlighter"}),t.registry.register(t.presets,!0)}(Pw||(Pw={}));const Nw=(t,e)=>t.map((({x:t,y:n,angle:i})=>Dw(Tw(e,{x:t,y:n}),i||0))),jw=(t,e,n)=>{const i=n.start||0,s=n.step||20;return Fw(t,e,i,((t,e)=>(t+.5-e/2)*s))},Lw=(t,e,n)=>{const i=n.start||0,s=n.step||360/t.length;return Fw(t,e,i,(t=>t*s))};function Fw(t,e,n,i){const s=e.getCenter(),r=e.getTopCenter(),o=e.width/e.height,a=By.fromRect(e),l=t.length;return t.map(((t,e)=>{const c=n+i(e,l),h=r.clone().rotate(-c,s).scale(o,1,s),u=t.compensateRotate?-a.tangentTheta(h):0;return(t.dx||t.dy)&&h.translate(t.dx||0,t.dy||0),t.dr&&h.move(s,t.dr),Dw(h.round(),u,t)}))}var Bw=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{const i=Tw(e,n.start||e.getOrigin()),s=Tw(e,n.end||e.getCorner());return Vw(t,i,s,n)},$w=(t,e,n)=>Vw(t,e.getTopLeft(),e.getBottomLeft(),n),zw=(t,e,n)=>Vw(t,e.getTopRight(),e.getBottomRight(),n),Iw=(t,e,n)=>Vw(t,e.getTopLeft(),e.getTopRight(),n),_w=(t,e,n)=>Vw(t,e.getBottomLeft(),e.getBottomRight(),n);function Vw(t,e,n,i){const s=new Fy(e,n),r=t.length;return t.map(((t,e)=>{var{strict:n}=t,o=Bw(t,["strict"]);const a=n||i.strict?(e+1)/(r+1):(e+.5)/r,l=s.pointAt(a);return(o.dx||o.dy)&&l.translate(o.dx||0,o.dy||0),Dw(l.round(),0,o)}))}var Gw;(function(t){t.presets=c,t.registry=yv.create({type:"port layout"}),t.registry.register(t.presets,!0)})(Gw||(Gw={}));const Hw={position:{x:0,y:0},angle:0,attrs:{".":{y:"0","text-anchor":"start"}}};function Uw(t,e){const{x:n,y:i,angle:s,attrs:r}=e||{};return Ru({},{angle:s,attrs:r,position:{x:n,y:i}},t,Hw)}const qw=(t,e,n)=>Uw({position:e.getTopLeft()},n),Ww=(t,e,n)=>Uw({position:{x:-15,y:0},attrs:{".":{y:".3em","text-anchor":"end"}}},n),Xw=(t,e,n)=>Uw({position:{x:15,y:0},attrs:{".":{y:".3em","text-anchor":"start"}}},n),Yw=(t,e,n)=>Uw({position:{x:0,y:-15},attrs:{".":{"text-anchor":"middle"}}},n),Jw=(t,e,n)=>Uw({position:{x:0,y:15},attrs:{".":{y:".6em","text-anchor":"middle"}}},n),Zw=(t,e,n)=>ex(t,e,!1,n),Kw=(t,e,n)=>ex(t,e,!0,n),Qw=(t,e,n)=>nx(t,e,!1,n),tx=(t,e,n)=>nx(t,e,!0,n);function ex(t,e,n,i){const s=null!=i.offset?i.offset:15,r=e.getCenter().theta(t),o=ix(e);let a,l,c,h,u=0;return ro[2]?(a=".3em",l=s,c=0,h="start"):ro[2]?(a=".3em",l=-s,c=0,h="end"):rox(t.diff(e.getCenter()),!1,n),rx=(t,e,n)=>ox(t.diff(e.getCenter()),!0,n);function ox(t,e,n){const i=null!=n.offset?n.offset:20,s=new jy(0,0),r=-t.theta(s),o=t.clone().move(s,i).diff(t).round();let a,l=".3em",c=r;return(r+90)%180===0?(a=e?"end":"middle",e||-270!==r||(l="0em")):r>-270&&r<-90?(a="start",c=r-180):a="end",Uw({position:o.round().toJSON(),angle:e?c:0,attrs:{".":{y:l,"text-anchor":a}}},n)}var ax,lx;(function(t){t.presets=h,t.registry=yv.create({type:"port label layout"}),t.registry.register(t.presets,!0)})(ax||(ax={}));class cx{constructor(t,e,n,i){return null==t?this.set(255,255,255,1):"number"===typeof t?this.set(t,e,n,i):"string"===typeof t?cx.fromString(t)||this:Array.isArray(t)?this.set(t):void this.set(t.r,t.g,t.b,null==t.a?1:t.a)}blend(t,e,n){this.set(t.r+(e.r-t.r)*n,t.g+(e.g-t.g)*n,t.b+(e.b-t.b)*n,t.a+(e.a-t.a)*n)}lighten(t){const e=cx.lighten(this.toArray(),t);this.r=e[0],this.g=e[1],this.b=e[2],this.a=e[3]}darken(t){this.lighten(-t)}set(t,e,n,i){const s=Array.isArray(t)?t[0]:t,r=Array.isArray(t)?t[1]:e,o=Array.isArray(t)?t[2]:n,a=Array.isArray(t)?t[3]:i;return this.r=Math.round(sm(s,0,255)),this.g=Math.round(sm(r,0,255)),this.b=Math.round(sm(o,0,255)),this.a=null==a?1:sm(a,0,1),this}toHex(){const t=["r","g","b"].map((t=>{const e=this[t].toString(16);return e.length<2?`0${e}`:e}));return`#${t.join("")}`}toRGBA(){return this.toArray()}toHSLA(){return cx.rgba2hsla(this.r,this.g,this.b,this.a)}toCSS(t){const e=`${this.r},${this.g},${this.b},`;return t?`rgb(${e})`:`rgba(${e},${this.a})`}toGrey(){return cx.makeGrey(Math.round((this.r+this.g+this.b)/3),this.a)}toArray(){return[this.r,this.g,this.b,this.a]}toString(){return this.toCSS()}}(function(t){function e(e){return new t(e)}function n(e){return new t([...g(e),1])}function i(e){const n=e.toLowerCase().match(/^rgba?\(([\s.,0-9]+)\)/);if(n){const e=n[1].split(/\s*,\s*/).map((t=>parseInt(t,10)));return new t(e)}return null}function s(t,e,n){n<0&&++n,n>1&&--n;const i=6*n;return i<1?t+(e-t)*i:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function r(e){const n=e.toLowerCase().match(/^hsla?\(([\s.,0-9]+)\)/);if(n){const e=n[2].split(/\s*,\s*/),i=(parseFloat(e[0])%360+360)%360/360,s=parseFloat(e[1])/100,r=parseFloat(e[2])/100,o=null==e[3]?1:parseInt(e[3],10);return new t(c(i,s,r,o))}return null}function o(e){if(e.startsWith("#"))return n(e);if(e.startsWith("rgb"))return i(e);const s=t.named[e];return s?n(s):r(e)}function a(e,n){return t.fromArray([e,e,e,n])}function l(t,e,n,i){const s=Array.isArray(t)?t[0]:t,r=Array.isArray(t)?t[1]:e,o=Array.isArray(t)?t[2]:n,a=Array.isArray(t)?t[3]:i,l=Math.max(s,r,o),c=Math.min(s,r,o),h=(l+c)/2;let u=0,d=0;if(c!==l){const t=l-c;switch(d=h>.5?t/(2-l-c):t/(l+c),l){case s:u=(r-o)/t+(r186?"#000000":"#ffffff":`${n?"#":""}${f(255-i,255-s,255-r)}`}const n=t[0],i=t[1],s=t[2],r=t[3];return e?.299*n+.587*i+.114*s>186?[0,0,0,r]:[255,255,255,r]:[255-n,255-i,255-s,r]}function g(t){const e=0===t.indexOf("#")?t:`#${t}`;let n=Number(`0x${e.substr(1)}`);if(4!==e.length&&7!==e.length||Number.isNaN(n))throw new Error("Invalid hex color.");const i=4===e.length?4:8,s=(1<{const t=n&s;return n>>=i,4===i?17*t:t}));return[r[2],r[1],r[0]]}function f(t,e,n){const i=t=>t.length<2?`0${t}`:t;return`${i(t.toString(16))}${i(e.toString(16))}${i(n.toString(16))}`}function m(t,e){return b(t,e)}function y(t,e){return b(t,-e)}function b(t,e){if("string"===typeof t){const n="#"===t[0],i=parseInt(n?t.substr(1):t,16),s=sm((i>>16)+e,0,255),r=sm((i>>8&255)+e,0,255),o=sm((255&i)+e,0,255);return`${n?"#":""}${(o|r<<8|s<<16).toString(16)}`}const n=f(t[0],t[1],t[2]),i=g(b(n,e));return[i[0],i[1],i[2],t[3]]}t.fromArray=e,t.fromHex=n,t.fromRGBA=i,t.fromHSLA=r,t.fromString=o,t.makeGrey=a,t.rgba2hsla=l,t.hsla2rgba=c,t.random=h,t.randomHex=u,t.randomRGBA=d,t.invert=p,t.lighten=m,t.darken=y})(cx||(cx={})),function(t){t.named={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",burntsienna:"#ea7e5d",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}}(cx||(cx={}));class hx{constructor(){this.listeners={}}on(t,e,n){if(null==e)return this;this.listeners[t]||(this.listeners[t]=[]);const i=this.listeners[t];return i.push(e,n),this}once(t,e,n){const i=(...s)=>(this.off(t,i),lx.call([e,n],s));return this.on(t,i,this)}off(t,e,n){if(!(t||e||n))return this.listeners={},this;const i=this.listeners,s=t?[t]:Object.keys(i);return s.forEach((t=>{const s=i[t];if(s)if(e||n)for(let i=s.length-2;i>=0;i-=2)e&&s[i]!==e||n&&s[i+1]!==n||s.splice(i,2);else delete i[t]})),this}trigger(t,...e){let n=!0;if("*"!==t){const i=this.listeners[t];null!=i&&(n=lx.call([...i],e))}const i=this.listeners["*"];return null!=i?Mm([n,lx.call([...i],[t,...e])]):n}emit(t,...e){return this.trigger(t,...e)}}(function(t){function e(t,e){const n=[];for(let i=0;i{const i=n.value,s=t.__proto__;n.value=function(){this.disposed||(i.call(this),s.dispose.call(this))}}}t.dispose=e})(ux||(ux={}));class dx{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEach((t=>{t.dispose()})),this.items.clear())}contains(t){return this.items.has(t)}add(t){this.items.add(t)}remove(t){this.items.delete(t)}clear(){this.items.clear()}}(function(t){function e(e){const n=new t;return e.forEach((t=>{n.add(t)})),n}t.from=e})(dx||(dx={}));class px extends hx{}(function(t){t.dispose=ux.dispose})(px||(px={})),$u(px,ux);class gx extends px{get disabled(){return!0===this._disabled}enable(){delete this._disabled}disable(){this._disabled=!0}}var fx,mx,yx,bx,vx,Cx=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class wx extends ux{constructor(){super(),this.clear()}clear(){this.map=new WeakMap,this.arr=[]}has(t){return this.map.has(t)}get(t){return this.map.get(t)}set(t,e){this.map.set(t,e),this.arr.push(t)}delete(t){const e=this.arr.indexOf(t);e>=0&&this.arr.splice(e,1);const n=this.map.get(t);return this.map.delete(t),n}each(t){this.arr.forEach((e=>{const n=this.map.get(e);t(n,e)}))}dispose(){this.clear()}}Cx([ux.dispose()],wx.prototype,"dispose",null);class xx{constructor(t={}){this.comparator=t.comparator||xx.defaultComparator,this.index={},this.data=t.data||[],this.heapify()}isEmpty(){return 0===this.data.length}insert(t,e,n){const i={priority:t,value:e},s=this.data.length-1;return n&&(i.id=n,this.index[n]=s),this.data.push(i),this.bubbleUp(s),this}peek(){return this.data[0]?this.data[0].value:null}peekPriority(){return this.data[0]?this.data[0].priority:null}updatePriority(t,e){const n=this.index[t];if("undefined"===typeof n)throw new Error(`Node with id '${t}' was not found in the heap.`);const i=this.data,s=i[n].priority,r=this.comparator(e,s);r<0?(i[n].priority=e,this.bubbleUp(n)):r>0&&(i[n].priority=e,this.bubbleDown(n))}remove(){const t=this.data,e=t[0],n=t.pop();return delete this.index[t.length],t.length>0&&(t[0]=n,n.id&&(this.index[n.id]=0),this.bubbleDown(0)),e?e.value:null}heapify(){for(let t=0;t0){if(i=s-1>>>1,!(this.comparator(e[s].priority,e[i].priority)<0))break;{n=e[i],e[i]=e[s];let t=e[s].id;null!=t&&(this.index[t]=i),e[s]=n,t=e[s].id,null!=t&&(this.index[t]=s),s=i}}}bubbleDown(t){const e=this.data,n=e.length-1;let i=t;while(1){const t=1+(i<<1),s=t+1;let r=i;if(t<=n&&this.comparator(e[t].priority,e[r].priority)<0&&(r=t),s<=n&&this.comparator(e[s].priority,e[r].priority)<0&&(r=s),r===i)break;{const t=e[r];e[r]=e[i];let n=e[i].id;null!=n&&(this.index[n]=r),e[i]=t,n=e[i].id,null!=n&&(this.index[n]=i),i=r}}}}(function(t){t.defaultComparator=(t,e)=>t-e})(xx||(xx={})),function(t){function e(t,e,n=((t,e)=>1)){const i={},s={},r={},o=new xx;i[e]=0,Object.keys(t).forEach((t=>{t!==e&&(i[t]=1/0),o.insert(i[t],t,t)}));while(!o.isEmpty()){const e=o.remove();r[e]=!0;const a=t[e]||[];for(let t=0;tt,t.quad=t=>t*t,t.cubic=t=>t*t*t,t.inout=t=>{if(t<=0)return 0;if(t>=1)return 1;const e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)},t.exponential=t=>Math.pow(2,10*(t-1)),t.bounce=t=>{for(let e=0,n=1;1;e+=n,n/=2)if(t>=(7-4*e)/11){const i=(11-6*e-11*t)/4;return-i*i+n*n}}}(mx||(mx={})),function(t){t.decorators={reverse(t){return e=>1-t(1-e)},reflect(t){return e=>.5*(e<.5?t(2*e):2-t(2-2*e))},clamp(t,e=0,n=1){return i=>{const s=t(i);return sn?n:s}},back(t=1.70158){return e=>e*e*((t+1)*e-t)},elastic(t=1.5){return e=>Math.pow(2,10*(e-1))*Math.cos(20*Math.PI*t/3*e)}}}(mx||(mx={})),function(t){function e(t){return-1*Math.cos(t*(Math.PI/2))+1}function n(t){return Math.sin(t*(Math.PI/2))}function i(t){return-.5*(Math.cos(Math.PI*t)-1)}function s(t){return t*t}function r(t){return t*(2-t)}function o(t){return t<.5?2*t*t:(4-2*t)*t-1}function a(t){return t*t*t}function l(t){const e=t-1;return e*e*e+1}function c(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1}function h(t){return t*t*t*t}function u(t){const e=t-1;return 1-e*e*e*e}function d(t){const e=t-1;return t<.5?8*t*t*t*t:1-8*e*e*e*e}function p(t){return t*t*t*t*t}function g(t){const e=t-1;return 1+e*e*e*e*e}function f(t){const e=t-1;return t<.5?16*t*t*t*t*t:1+16*e*e*e*e*e}function m(t){return 0===t?0:Math.pow(2,10*(t-1))}function y(t){return 1===t?1:1-Math.pow(2,-10*t)}function b(t){if(0===t||1===t)return t;const e=2*t,n=e-1;return e<1?.5*Math.pow(2,10*n):.5*(2-Math.pow(2,-10*n))}function v(t){const e=t/1;return-1*(Math.sqrt(1-e*t)-1)}function C(t){const e=t-1;return Math.sqrt(1-e*e)}function w(t){const e=2*t,n=e-2;return e<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-n*n)+1)}function x(t,e=1.70158){return t*t*((e+1)*t-e)}function E(t,e=1.70158){const n=t/1-1;return n*n*((e+1)*n+e)+1}function S(t,e=1.70158){const n=2*t,i=n-2,s=1.525*e;return n<1?.5*n*n*((s+1)*n-s):.5*(i*i*((s+1)*i+s)+2)}function A(t,e=.7){if(0===t||1===t)return t;const n=t/1,i=n-1,s=1-e,r=s/(2*Math.PI)*Math.asin(1);return-Math.pow(2,10*i)*Math.sin((i-r)*(2*Math.PI)/s)}function M(t,e=.7){const n=1-e,i=2*t;if(0===t||1===t)return t;const s=n/(2*Math.PI)*Math.asin(1);return Math.pow(2,-10*i)*Math.sin((i-s)*(2*Math.PI)/n)+1}function k(t,e=.65){const n=1-e;if(0===t||1===t)return t;const i=2*t,s=i-1,r=n/(2*Math.PI)*Math.asin(1);return i<1?Math.pow(2,10*s)*Math.sin((s-r)*(2*Math.PI)/n)*-.5:Math.pow(2,-10*s)*Math.sin((s-r)*(2*Math.PI)/n)*.5+1}function O(t){const e=t/1;if(e<1/2.75)return 7.5625*e*e;if(e<2/2.75){const t=e-1.5/2.75;return 7.5625*t*t+.75}if(e<2.5/2.75){const t=e-2.25/2.75;return 7.5625*t*t+.9375}{const t=e-2.625/2.75;return 7.5625*t*t+.984375}}function P(t){return 1-O(1-t)}function T(t){return t<.5?.5*P(2*t):.5*O(2*t-1)+.5}t.easeInSine=e,t.easeOutSine=n,t.easeInOutSine=i,t.easeInQuad=s,t.easeOutQuad=r,t.easeInOutQuad=o,t.easeInCubic=a,t.easeOutCubic=l,t.easeInOutCubic=c,t.easeInQuart=h,t.easeOutQuart=u,t.easeInOutQuart=d,t.easeInQuint=p,t.easeOutQuint=g,t.easeInOutQuint=f,t.easeInExpo=m,t.easeOutExpo=y,t.easeInOutExpo=b,t.easeInCirc=v,t.easeOutCirc=C,t.easeInOutCirc=w,t.easeInBack=x,t.easeOutBack=E,t.easeInOutBack=S,t.easeInElastic=A,t.easeOutElastic=M,t.easeInOutElastic=k,t.easeOutBounce=O,t.easeInBounce=P,t.easeInOutBounce=T}(mx||(mx={})),function(t){t.number=(t,e)=>{const n=e-t;return e=>t+n*e},t.object=(t,e)=>{const n=Object.keys(t);return i=>{const s={};for(let r=n.length-1;-1!==r;r-=1){const o=n[r];s[o]=t[o]+(e[o]-t[o])*i}return s}},t.unit=(t,e)=>{const n=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,i=n.exec(t),s=n.exec(e),r=s?s[1]:"",o=i?+i[1]:0,a=s?+s[1]:0,l=r.indexOf("."),c=l>0?r[1].length-l-1:0,h=a-o,u=i?i[2]:"";return t=>(o+h*t).toFixed(c)+u},t.color=(t,e)=>{const n=parseInt(t.slice(1),16),i=parseInt(e.slice(1),16),s=255&n,r=(255&i)-s,o=65280&n,a=(65280&i)-o,l=16711680&n,c=(16711680&i)-l;return t=>{const e=s+r*t&255,n=o+a*t&65280,i=l+c*t&16711680;return`#${(1<<24|e|n|i).toString(16).slice(1)}`}}}(yx||(yx={})),function(t){const e=`${Cw.prefixCls}.storage`;function n(t,e,n){const i=e.id||gg("doc-"),s=l(t);s.keys.push(i),o(c(t,i),e),o(h(t),s),r(n,null,Object.assign(Object.assign({},e),{id:i}))}function i(t,e,n){const i=l(t),s=[];if(null==e)i.keys.forEach((e=>{const i=a(c(t,e));i?s.push(i):r(n,new Error(`No document found for an ID '${e}' from index.`))})),r(n,null,s);else if(e.id){const i=a(c(t,e.id));r(n,null,i?[i]:[])}else r(n,null,[])}function s(t,e,n){const i=l(t);if(null==e)i.keys.forEach((e=>{localStorage.removeItem(c(t,e))})),localStorage.removeItem(h(t)),r(n,null);else if(e.id){const s=i.keys.indexOf(e.id);s>=0&&i.keys.splice(s,1),localStorage.removeItem(c(t,e.id)),o(h(t),i),r(n,null)}}function r(t,e,n){t&&wm((()=>{t(e,n)}))}function o(t,e){localStorage.setItem(t,JSON.stringify(e))}function a(t){const e=localStorage.getItem(t);return e?JSON.parse(e):null}function l(t){const e=a(h(t));return e?(null==e.keys&&(e.keys=[]),e):{keys:[]}}function c(t,n){return`${e}.${t}.docs.${n}`}function h(t){return`${e}.${t}.index`}t.insert=n,t.find=i,t.remove=s}(bx||(bx={}));class Ex extends px{constructor(){super(),this.cid=vx.uniqueId(),Ex.views[this.cid]=this}get priority(){return 2}confirmUpdate(t,e){return 0}$(t){return Ex.$(t)}empty(t=this.container){return this.$(t).empty(),this}unmount(t=this.container){return this.$(t).remove(),this}remove(t=this.container){return t===this.container&&(this.removeEventListeners(document),this.onRemove(),delete Ex.views[this.cid]),this.unmount(t),this}onRemove(){}setClass(t,e=this.container){e.classList.value=Array.isArray(t)?t.join(" "):t}addClass(t,e=this.container){return this.$(e).addClass(Array.isArray(t)?t.join(" "):t),this}removeClass(t,e=this.container){return this.$(e).removeClass(Array.isArray(t)?t.join(" "):t),this}setStyle(t,e=this.container){return this.$(e).css(t),this}setAttrs(t,e=this.container){return null!=t&&null!=e&&(e instanceof SVGElement?hy(e,t):this.$(e).attr(t)),this}findAttr(t,e=this.container){let n=e;while(n&&1===n.nodeType){const e=n.getAttribute(t);if(null!=e)return e;if(n===this.container)return null;n=n.parentNode}return null}find(t,e=this.container,n=this.selectors){return Ex.find(t,e,n).elems}findOne(t,e=this.container,n=this.selectors){const i=this.find(t,e,n);return i.length>0?i[0]:null}findByAttr(t,e=this.container){let n=e;while(n&&n.getAttribute){const e=n.getAttribute(t);if((null!=e||n===this.container)&&"false"!==e)return n;n=n.parentNode}return null}getSelector(t,e){let n;if(t===this.container)return"string"===typeof e&&(n=`> ${e}`),n;if(t){const i=Xm(t)+1;n=`${t.tagName.toLowerCase()}:nth-child(${i})`,e&&(n+=` > ${e}`),n=this.getSelector(t.parentNode,n)}return n}prefixClassName(t){return ww.prefix(t)}delegateEvents(t,e){if(null==t)return this;e||this.undelegateEvents();const n=/^(\S+)\s*(.*)$/;return Object.keys(t).forEach((e=>{const i=e.match(n);if(null==i)return;const s=this.getEventHandler(t[e]);"function"===typeof s&&this.delegateEvent(i[1],i[2],s)})),this}undelegateEvents(){return this.$(this.container).off(this.getEventNamespace()),this}delegateDocumentEvents(t,e){return this.addEventListeners(document,t,e),this}undelegateDocumentEvents(){return this.removeEventListeners(document),this}delegateEvent(t,e,n){return this.$(this.container).on(t+this.getEventNamespace(),e,n),this}undelegateEvent(t,e,n){const i=t+this.getEventNamespace();return null==e?this.$(this.container).off(i):"string"===typeof e?this.$(this.container).off(i,e,n):this.$(this.container).off(i,e),this}addEventListeners(t,e,n){if(null==e)return this;const i=this.getEventNamespace(),s=this.$(t);return Object.keys(e).forEach((t=>{const r=this.getEventHandler(e[t]);"function"===typeof r&&s.on(t+i,n,r)})),this}removeEventListeners(t){return null!=t&&this.$(t).off(this.getEventNamespace()),this}getEventNamespace(){return`.${Cw.prefixCls}-event-${this.cid}`}getEventHandler(t){let e;if("string"===typeof t){const n=this[t];"function"===typeof n&&(e=(...t)=>n.call(this,...t))}else e=(...e)=>t.call(this,...e);return e}getEventTarget(t,e={}){const{target:n,type:i,clientX:s=0,clientY:r=0}=t;return e.fromPoint||"touchmove"===i||"touchend"===i?document.elementFromPoint(s,r):n}stopPropagation(t){return this.setEventData(t,{propagationStopped:!0}),this}isPropagationStopped(t){return!0===this.getEventData(t).propagationStopped}getEventData(t){return this.eventData(t)}setEventData(t,e){return this.eventData(t,e)}eventData(t,e){if(null==t)throw new TypeError("Event object required");let n=t.data;const i=`__${this.cid}__`;return null==e?null==n?{}:n[i]||{}:(null==n&&(n=t.data={}),null==n[i]?n[i]=Object.assign({},e):n[i]=Object.assign(Object.assign({},n[i]),e),n[i])}normalizeEvent(t){return Ex.normalizeEvent(t)}}(function(t){function e(t){return v()(t)}function n(t,e){return e?Hm(t||"g"):Gm(t||"div")}function i(t,n,i){if(!t||"."===t)return{elems:[n]};if(i){const e=i[t];if(e)return{elems:Array.isArray(e)?e:[e]}}return Cw.useCSSSelector?{isCSSSelector:!0,elems:e(n).find(t).toArray()}:{elems:[]}}function s(t){let e=t;const n=t.originalEvent,i=n&&n.changedTouches&&n.changedTouches[0];if(i){for(const e in t)void 0===i[e]&&(i[e]=t[e]);e=i}const s=e.target;if(s){const t=s.correspondingUseElement;t&&(e.target=t)}return e}t.$=e,t.createElement=n,t.find=i,t.normalizeEvent=s})(Ex||(Ex={})),function(t){function e(e){return t.views[e]||null}t.views={},t.getView=e}(Ex||(Ex={})),function(t){let e=0;function n(){const t=`v${e}`;return e+=1,t}t.uniqueId=n}(vx||(vx={}));const Sx=t=>t;function Ax(t,e){return 0===e?"0%":`${Math.round(t/e*100)}%`}function Mx(t){const e=(e,n,i,s)=>n.isEdgeElement(i)?Ox(t,e,n,i,s):kx(t,e,n,i,s);return e}function kx(t,e,n,i,s){const r=n.cell,o=r.getAngle(),a=n.getUnrotatedBBoxOfElement(i),l=r.getBBox().getCenter(),c=jy.create(s).rotate(o,l);let h=c.x-a.x,u=c.y-a.y;return t&&(h=Ax(h,a.width),u=Ax(u,a.height)),e.anchor={name:"topLeft",args:{dx:h,dy:u,rotate:!0}},e}function Ox(t,e,n,i,s){const r=n.getConnection();if(!r)return e;const o=r.closestPointLength(s);if(t){const t=r.length();e.anchor={name:"ratio",args:{ratio:o/t}}}else e.anchor={name:"length",args:{length:o}};return e}const Px=Mx(!0),Tx=Mx(!1);var Dx,Nx;(function(t){t.presets=u,t.registry=yv.create({type:"connection strategy"}),t.registry.register(t.presets,!0)})(Dx||(Dx={}));class jx{constructor(t){this.view=t,this.clean()}clean(){this.elemCache&&this.elemCache.dispose(),this.elemCache=new wx,this.pathCache={}}get(t){const e=this.elemCache;return e.has(t)||this.elemCache.set(t,{}),this.elemCache.get(t)}getData(t){const e=this.get(t);return e.data||(e.data={}),e.data}getMatrix(t){const e=this.get(t);if(null==e.matrix){const n=this.view.rotatableNode||this.view.container;e.matrix=Jb(t,n)}return Lb(e.matrix)}getShape(t){const e=this.get(t);return null==e.shape&&(e.shape=Kb(t)),e.shape.clone()}getBoundingRect(t){const e=this.get(t);return null==e.boundingRect&&(e.boundingRect=Yb(t)),e.boundingRect.clone()}}(function(t){function e(t){return null!=t&&!n(t)}function n(t){return null!=t&&"string"===typeof t}function i(t){return null==t||n(t)?t:ku(t)}function s(t){return`${t}`.trim().replace(/[\r|\n]/g," ").replace(/>\s+<")}function r(t){const e=document.createDocumentFragment(),n={},i={},r=s(t),o=Zf(r,{raw:!0});return o.forEach((t=>{e.appendChild(t)})),{fragment:e,selectors:i,groups:n}}function o(t,e={ns:Im.svg}){const n=document.createDocumentFragment(),i={},s={},r=[{markup:Array.isArray(t)?t:[t],parent:n,ns:e.ns}];while(r.length>0){const t=r.pop();let e=t.ns||Im.svg;const n=t.markup,o=t.parent;n.forEach((t=>{const n=t.tagName;if(!n)throw new TypeError("Invalid tagName");t.ns&&(e=t.ns);const a=e===Im.svg,l=e?Gm(n,e):Vm(n),c=t.attrs;c&&(a?hy(l,dy(c)):v()(l).attr(c));const h=t.style;h&&v()(l).css(h);const u=t.className;null!=u&&l.setAttribute("class",Array.isArray(u)?u.join(" "):u),t.textContent&&(l.textContent=t.textContent);const d=t.selector;if(null!=d){if(s[d])throw new TypeError("Selector must be unique");s[d]=l}if(t.groupSelector){let e=t.groupSelector;Array.isArray(e)||(e=[e]),e.forEach((t=>{i[t]||(i[t]=[]),i[t].push(l)}))}o.appendChild(l);const p=t.children;Array.isArray(p)&&r.push({ns:e,markup:p,parent:l})}))}return Object.keys(i).forEach((t=>{if(s[t])throw new Error("Ambiguous group selector");s[t]=i[t]})),{fragment:n,selectors:s,groups:i}}function a(t){return t instanceof SVGElement?Hm("g"):Vm("div")}function l(t){if(n(t)){const e=rb.createVectors(t),n=e.length;if(1===n)return{elem:e[0].node};if(n>1){const t=a(e[0].node);return e.forEach((e=>{t.appendChild(e.node)})),{elem:t}}return{}}const e=o(t),i=e.fragment;let s=null;return i.childNodes.length>1?(s=a(i.firstChild),s.appendChild(i)):s=i.firstChild,{elem:s,selectors:e.selectors}}function c(t){const e=rb.createVectors(t),n=document.createDocumentFragment();for(let i=0,s=e.length;i ${r} > ${i}`:`> ${r}`,s;const o=t.parentNode;if(o&&o.childNodes.length>1){const e=Xm(t)+1;s=`${r}:nth-child(${e})`}else s=r;return i&&(s+=` > ${i}`),e(t.parentNode,n,s)}return i}function n(t,n,i){if("#text"===t.nodeName)return null;let s=null,r=null,o=null,a=!1;const l={tagName:t.tagName};if(t.attributes){o={};for(let e=0,n=t.attributes.length;e{const s=n(t,e,i);if(null!=s){const{markup:n,attrs:i,isCSSSelector:r}=s;if(a.set(t,n),n.selector&&null!=i&&(Object.keys(i).length&&(o[n.selector]=i),r&&delete n.selector),t.childNodes&&t.childNodes.length>0)for(let s=0,o=t.childNodes.length;sl(t,t))).filter((t=>null!=t));return{markup:c,attrs:o}}t.getSelector=e,t.xml2json=i}(Nx||(Nx={})),function(t){function e(){return"g"}function n(){return{tagName:"circle",selector:"circle",attrs:{r:10,fill:"#FFFFFF",stroke:"#000000"}}}function i(){return{tagName:"text",selector:"text",attrs:{fill:"#000000"}}}t.getPortContainerMarkup=e,t.getPortMarkup=n,t.getPortLabelMarkup=i}(Nx||(Nx={})),function(t){function e(){return t.sanitize('\n \n \n \n \n \n \n \n \n ')}function n(){return t.sanitize('\n \n \n \n \n Remove edge.\n \n \n \n \n Edge options.\n \n \n ')}function i(){return t.sanitize('\n \n \n \n \n Remove vertex.\n \n \n ')}function s(){return t.sanitize('\n \n \n \n ')}t.getEdgeMarkup=e,t.getEdgeToolMarkup=n,t.getEdgeVertexMarkup=i,t.getEdgeArrowheadMarkup=s}(Nx||(Nx={})),function(t){function e(t=!1){return{tagName:"foreignObject",selector:"fo",children:[{ns:Im.xhtml,tagName:"body",selector:"foBody",attrs:{xmlns:Im.xhtml},style:{width:"100%",height:"100%",background:"transparent"},children:t?[]:[{tagName:"div",selector:"foContent",style:{width:"100%",height:"100%"}}]}]}}t.getForeignObjectMarkup=e}(Nx||(Nx={}));class Lx{constructor(t){this.view=t}get cell(){return this.view.cell}getDefinition(t){return this.cell.getAttrDefinition(t)}processAttrs(t,e){let n,i,s,r,o;const a=[];return Object.keys(e).forEach((i=>{const s=e[i],r=this.getDefinition(i),o=Em(YC.isValidDefinition,this.view,r,s,{elem:t,attrs:e,cell:this.cell,view:this.view});if(r&&o)"string"===typeof r?(null==n&&(n={}),n[r]=s):null!==s&&a.push({name:i,definition:r});else{null==n&&(n={});const t=Lx.CASE_SENSITIVE_ATTR.includes(i)?i:Wf(i);n[t]=s}})),a.forEach((({name:n,definition:a})=>{const l=e[n],c=a;"function"===typeof c.set&&(!ry(t)&&Lx.DELAY_ATTRS.includes(n)?(null==o&&(o={}),o[n]=l):(null==i&&(i={}),i[n]=l));const h=a;"function"===typeof h.offset&&(null==s&&(s={}),s[n]=l);const u=a;"function"===typeof u.position&&(null==r&&(r={}),r[n]=l)})),{raw:e,normal:n,set:i,offset:s,position:r,delay:o}}mergeProcessedAttrs(t,e){t.set=Object.assign(Object.assign({},t.set),e.set),t.position=Object.assign(Object.assign({},t.position),e.position),t.offset=Object.assign(Object.assign({},t.offset),e.offset);const n=t.normal&&t.normal.transform;null!=n&&e.normal&&(e.normal.transform=n),t.normal=e.normal}findAttrs(t,e,n,i){const s=[],r=new wx;return Object.keys(t).forEach((o=>{const a=t[o];if(!pc(a))return;const{isCSSSelector:l,elems:c}=Ex.find(o,e,i);n[o]=c;for(let t=0,e=c.length;t{const e=r.get(t),n=e.attrs;e.attrs=n.reduceRight(((t,e)=>kc(t,e)),{})})),r}updateRelativeAttrs(t,e,n,i){const s=e.raw||{};let r=e.normal||{};const o=e.set,a=e.position,l=e.offset,c=e.delay,h=()=>({elem:t,cell:this.cell,view:this.view,attrs:s,refBBox:n.clone()});if(null!=o&&Object.keys(o).forEach((t=>{const e=o[t],n=this.getDefinition(t);if(null!=n){const i=Em(n.set,this.view,e,h());"object"===typeof i?r=Object.assign(Object.assign({},r),i):null!=i&&(r[t]=i)}})),ry(t))return void this.view.setAttrs(r,t);const u=r.transform,d=u?`${u}`:null,p=Bb(d),g=new jy(p.e,p.f);u&&(delete r.transform,p.e=0,p.f=0);let f=1,m=1;if(a||l){const e=this.view.getScaleOfElement(t,i.scalableNode);f=e.sx,m=e.sy}let y=!1;null!=a&&Object.keys(a).forEach((t=>{const e=a[t],n=this.getDefinition(t);if(null!=n){const t=Em(n.position,this.view,e,h());null!=t&&(y=!0,g.translate(jy.create(t).scale(f,m)))}})),this.view.setAttrs(r,t);let b=!1;if(null!=l){const e=this.view.getBoundingRectOfElement(t);if(e.width>0&&e.height>0){const n=qb(e,p).scale(1/f,1/m);Object.keys(l).forEach((e=>{const i=l[e],r=this.getDefinition(e);if(null!=r){const e=Em(r.offset,this.view,i,{elem:t,cell:this.cell,view:this.view,attrs:s,refBBox:n});null!=e&&(b=!0,g.translate(jy.create(e).scale(f,m)))}}))}}(null!=u||y||b)&&(g.round(1),p.e=g.x,p.f=g.y,t.setAttribute("transform",Rb(p)));const v=()=>{null!=c&&Object.keys(c).forEach((e=>{const n=c[e],i=this.getDefinition(e);if(null!=i){const s=Em(i.set,this.view,n,h());"object"===typeof s?this.view.setAttrs(s,t):null!=s&&this.view.setAttrs({[e]:s},t)}}))};i.forceSync?v():mv.scheduleTask(v)}update(t,e,n){const i={},s=this.findAttrs(n.attrs||e,t,i,n.selectors),r=n.attrs?this.findAttrs(e,t,i,n.selectors):s,o=[];s.each((e=>{const s=e.elem,a=e.attrs,l=this.processAttrs(s,a);if(null==l.set&&null==l.position&&null==l.offset&&null==l.delay)this.view.setAttrs(l.normal,s);else{const e=r.get(s),c=e?e.attrs:null,h=c&&null==a.ref?c.ref:a.ref;let u;if(h){if(u=(i[h]||this.view.find(h,t,n.selectors))[0],!u)throw new Error(`"${h}" reference does not exist.`)}else u=null;const d={node:s,refNode:u,attributes:c,processedAttributes:l},p=o.findIndex((t=>t.refNode===s));p>-1?o.splice(p,0,d):o.push(d)}}));const a=new wx;let l;o.forEach((e=>{const i=e.node,s=e.refNode;let r;const c=null!=s&&null!=n.rotatableNode&&Km(n.rotatableNode,s);if(s&&(r=a.get(s)),!r){const e=c?n.rotatableNode:t;r=s?Yb(s,{target:e}):n.rootBBox,s&&a.set(s,r)}let h;n.attrs&&e.attributes?(h=this.processAttrs(i,e.attributes),this.mergeProcessedAttrs(h,e.processedAttributes)):h=e.processedAttributes;let u=r;c&&null!=n.rotatableNode&&!n.rotatableNode.contains(i)&&(l||(l=Bb(hy(n.rotatableNode,"transform"))),u=qb(r,l));const d=o.find((t=>t.refNode===i));d&&(n.forceSync=!0),this.updateRelativeAttrs(i,h,u,n)}))}}(function(t){t.CASE_SENSITIVE_ATTR=["viewBox"],t.DELAY_ATTRS=["text","textWrap","sourceMarker","targetMarker"]})(Lx||(Lx={}));class Fx{constructor(t,e,n=[]){this.view=t;const i={},s={};let r=0;Object.keys(e).forEach((t=>{let n=e[t];Array.isArray(n)||(n=[n]),n.forEach((e=>{let n=i[e];n||(r+=1,n=i[e]=1<{i[t]||(r+=1,i[t]=1<25)throw new Error("Maximum number of flags exceeded.");this.flags=i,this.attrs=s,this.bootstrap=n}get cell(){return this.view.cell}getFlag(t){const e=this.flags;return null==e?0:Array.isArray(t)?t.reduce(((t,n)=>t|e[n]),0):0|e[t]}hasAction(t,e){return t&this.getFlag(e)}removeAction(t,e){return t^t&this.getFlag(e)}getBootstrapFlag(){return this.getFlag(this.bootstrap)}getChangedFlag(){let t=0;return this.attrs?(Object.keys(this.attrs).forEach((e=>{this.cell.hasChanged(e)&&(t|=this.attrs[e])})),t):t}}var Bx=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);snull!=e?hn([...Array.isArray(t)?t:[t],...Array.isArray(e)?e:[e]]):Array.isArray(t)?[...t]:[t],n=ku(this.getDefaults()),{bootstrap:i,actions:s,events:r,documentEvents:o}=t,a=Bx(t,["bootstrap","actions","events","documentEvents"]);return i&&(n.bootstrap=e(n.bootstrap,i)),s&&Object.keys(s).forEach((t=>{const i=s[t],r=n.actions[t];i&&r?n.actions[t]=e(r,i):i&&(n.actions[t]=e(i))})),r&&(n.events=Object.assign(Object.assign({},n.events),r)),t.documentEvents&&(n.documentEvents=Object.assign(Object.assign({},n.documentEvents),o)),kc(n,a)}get[Symbol.toStringTag](){return Rx.toStringTag}init(){}onRemove(){this.removeTools()}get priority(){return this.options.priority}get rootSelector(){return this.options.rootSelector}getConstructor(){return this.constructor}ensureOptions(t){return this.getConstructor().getOptions(t)}getContainerTagName(){return this.options.isSvgElement?"g":"div"}getContainerStyle(){}getContainerAttrs(){return{"data-cell-id":this.cell.id,"data-shape":this.cell.shape}}getContainerClassName(){return this.prefixClassName("cell")}ensureContainer(){return Ex.createElement(this.getContainerTagName(),this.options.isSvgElement)}setContainer(t){if(this.container!==t){this.undelegateEvents(),this.container=t,null!=this.options.events&&this.delegateEvents(this.options.events);const e=this.getContainerAttrs();null!=e&&this.setAttrs(e,t);const n=this.getContainerStyle();null!=n&&this.setStyle(n,t);const i=this.getContainerClassName();null!=i&&this.addClass(i,t)}return this}isNodeView(){return!1}isEdgeView(){return!1}render(){return this}confirmUpdate(t,e={}){return 0}getBootstrapFlag(){return this.flag.getBootstrapFlag()}getFlag(t){return this.flag.getFlag(t)}hasAction(t,e){return this.flag.hasAction(t,e)}removeAction(t,e){return this.flag.removeAction(t,e)}handleAction(t,e,n,i){if(this.hasAction(t,e)){n();const s=[e];return i&&("string"===typeof i?s.push(i):s.push(...i)),this.removeAction(t,s)}return t}setup(){this.cell.on("changed",(({options:t})=>this.onAttrsChange(t)))}onAttrsChange(t){let e=this.flag.getChangedFlag();!t.updated&&e&&(t.dirty&&this.hasAction(e,"update")&&(e|=this.getFlag("render")),t.toolId&&(t.async=!1),null!=this.graph&&this.graph.renderer.requestViewUpdate(this,e,this.priority,t))}parseJSONMarkup(t,e){const n=Nx.parseJSONMarkup(t),i=n.selectors,s=this.rootSelector;if(e&&s){if(i[s])throw new Error("Invalid root selector");i[s]=e}return n}can(t){let e=this.graph.options.interacting;if("function"===typeof e&&(e=Em(e,this.graph,this)),"object"===typeof e){let n=e[t];return"function"===typeof n&&(n=Em(n,this.graph,this)),!1!==n}return"boolean"===typeof e&&e}cleanCache(){return this.cache.clean(),this}getCache(t){return this.cache.get(t)}getDataOfElement(t){return this.cache.getData(t)}getMatrixOfElement(t){return this.cache.getMatrix(t)}getShapeOfElement(t){return this.cache.getShape(t)}getScaleOfElement(t,e){let n,i;if(e&&e.contains(t)){const t=lv(e);n=1/t.sx,i=1/t.sy}else n=1,i=1;return{sx:n,sy:i}}getBoundingRectOfElement(t){return this.cache.getBoundingRect(t)}getBBoxOfElement(t){const e=this.getBoundingRectOfElement(t),n=this.getMatrixOfElement(t),i=this.getRootRotatedMatrix(),s=this.getRootTranslatedMatrix();return qb(e,s.multiply(i).multiply(n))}getUnrotatedBBoxOfElement(t){const e=this.getBoundingRectOfElement(t),n=this.getMatrixOfElement(t),i=this.getRootTranslatedMatrix();return qb(e,i.multiply(n))}getBBox(t={}){let e;if(t.useCellGeometry){const t=this.cell,n=t.isNode()?t.getAngle():0;e=t.getBBox().bbox(n)}else e=this.getBBoxOfElement(this.container);return this.graph.localToGraph(e)}getRootTranslatedMatrix(){const t=this.cell,e=t.isNode()?t.getPosition():{x:0,y:0};return Lb().translate(e.x,e.y)}getRootRotatedMatrix(){let t=Lb();const e=this.cell,n=e.isNode()?e.getAngle():0;if(n){const i=e.getBBox(),s=i.width/2,r=i.height/2;t=t.translate(s,r).rotate(n).translate(-s,-r)}return t}findMagnet(t=this.container){return this.findByAttr("magnet",t)}updateAttrs(t,e,n={}){null==n.rootBBox&&(n.rootBBox=new Ly),null==n.selectors&&(n.selectors=this.selectors),this.attr.update(t,e,n)}isEdgeElement(t){return this.cell.isEdge()&&(null==t||t===this.container)}prepareHighlight(t,e={}){const n=t&&this.$(t)[0]||this.container;return e.partial=n===this.container,n}highlight(t,e={}){const n=this.prepareHighlight(t,e);return this.notify("cell:highlight",{magnet:n,options:e,view:this,cell:this.cell}),this.isEdgeView()?this.notify("edge:highlight",{magnet:n,options:e,view:this,edge:this.cell,cell:this.cell}):this.isNodeView()&&this.notify("node:highlight",{magnet:n,options:e,view:this,node:this.cell,cell:this.cell}),this}unhighlight(t,e={}){const n=this.prepareHighlight(t,e);return this.notify("cell:unhighlight",{magnet:n,options:e,view:this,cell:this.cell}),this.isNodeView()?this.notify("node:unhighlight",{magnet:n,options:e,view:this,node:this.cell,cell:this.cell}):this.isEdgeView()&&this.notify("edge:unhighlight",{magnet:n,options:e,view:this,edge:this.cell,cell:this.cell}),this}notifyUnhighlight(t,e){}getEdgeTerminal(t,e,n,i,s){const r=this.cell,o=this.findAttr("port",t),a=t.getAttribute("data-selector"),l={cell:r.id};return null!=a&&(l.magnet=a),null!=o?(l.port=o,r.isNode()&&(r.hasPort(o)||null!=a||(l.selector=this.getSelector(t)))):null==a&&this.container!==t&&(l.selector=this.getSelector(t)),this.customizeEdgeTerminal(l,t,e,n,i,s)}customizeEdgeTerminal(t,e,n,i,s,r){const o=s.getStrategy()||this.graph.options.connecting.strategy;if(o){const a="string"===typeof o?o:o.name,l="string"===typeof o?{}:o.args||{},c=Dx.registry;if(a){const o=c.get(a);if(null==o)return c.onNotFound(a);const h=Em(o,this.graph,t,this,e,new jy(n,i),s,r,l);if(h)return h}}return t}getMagnetFromEdgeTerminal(t){const e=this.cell,n=this.container,i=t.port;let s,r=t.magnet;return null!=i&&e.isNode()&&e.hasPort(i)?s=this.findPortElem(i,r)||n:(r||(r=t.selector),r||null==i||(r=`[port="${i}"]`),s=this.findOne(r,n,this.selectors)),s}animate(t,e){const n="string"===typeof t?this.findOne(t):t;if(null==n)throw new Error("Invalid animation element.");const i=n.parentNode,s=()=>{i||Qm(n)},r=rb.create(n);i||r.appendTo(this.graph.view.stage);const o=e.complete;return e.complete=t=>{s(),o&&o(t)},r.animate(e)}animateTransform(t,e){const n="string"===typeof t?this.findOne(t):t;if(null==n)throw new Error("Invalid animation element.");const i=n.parentNode,s=()=>{i||Qm(n)},r=rb.create(n);i||r.appendTo(this.graph.view.stage);const o=e.complete;return e.complete=t=>{s(),o&&o(t)},r.animateTransform(e)}hasTools(t){const e=this.tools;return null!=e&&(null==t||e.name===t)}addTools(t){if(!this.can("toolsAddable"))return this;if(this.removeTools(),t){const e=$x.isToolsView(t)?t:new $x(t);this.tools=e,this.graph.on("tools:hide",this.hideTools,this),this.graph.on("tools:show",this.showTools,this),this.graph.on("tools:remove",this.removeTools,this),e.config({view:this}),e.mount()}return this}updateTools(t={}){return this.tools&&this.tools.update(t),this}removeTools(){return this.tools&&(this.tools.remove(),this.graph.off("tools:hide",this.hideTools,this),this.graph.off("tools:show",this.showTools,this),this.graph.off("tools:remove",this.removeTools,this),this.tools=null),this}hideTools(){return this.tools&&this.tools.hide(),this}showTools(){return this.tools&&this.tools.show(),this}renderTools(){const t=this.cell.getTools();return this.addTools(t),this}notify(t,e){return this.trigger(t,e),this.graph.trigger(t,e),this}getEventArgs(t,e,n){const i=this,s=i.cell;return null==e||null==n?{e:t,view:i,cell:s}:{e:t,x:e,y:n,view:i,cell:s}}onClick(t,e,n){this.notify("cell:click",this.getEventArgs(t,e,n))}onDblClick(t,e,n){this.notify("cell:dblclick",this.getEventArgs(t,e,n))}onContextMenu(t,e,n){this.notify("cell:contextmenu",this.getEventArgs(t,e,n))}onMouseDown(t,e,n){this.cell.model&&(this.cachedModelForMouseEvent=this.cell.model,this.cachedModelForMouseEvent.startBatch("mouse")),this.notify("cell:mousedown",this.getEventArgs(t,e,n))}onMouseUp(t,e,n){this.notify("cell:mouseup",this.getEventArgs(t,e,n)),this.cachedModelForMouseEvent&&(this.cachedModelForMouseEvent.stopBatch("mouse",{cell:this.cell}),this.cachedModelForMouseEvent=null)}onMouseMove(t,e,n){this.notify("cell:mousemove",this.getEventArgs(t,e,n))}onMouseOver(t){this.notify("cell:mouseover",this.getEventArgs(t))}onMouseOut(t){this.notify("cell:mouseout",this.getEventArgs(t))}onMouseEnter(t){this.notify("cell:mouseenter",this.getEventArgs(t))}onMouseLeave(t){this.notify("cell:mouseleave",this.getEventArgs(t))}onMouseWheel(t,e,n,i){this.notify("cell:mousewheel",Object.assign({delta:i},this.getEventArgs(t,e,n)))}onCustomEvent(t,e,n,i){this.notify("cell:customevent",Object.assign({name:e},this.getEventArgs(t,n,i))),this.notify(e,Object.assign({},this.getEventArgs(t,n,i)))}onMagnetMouseDown(t,e,n,i){}onMagnetDblClick(t,e,n,i){}onMagnetContextMenu(t,e,n,i){}onLabelMouseDown(t,e,n){}checkMouseleave(t){const e=this.graph;e.renderer.isAsync()&&e.renderer.dumpView(this);const n=this.getEventTarget(t,{fromPoint:!0}),i=e.renderer.findViewByElem(n);i!==this&&(this.onMouseLeave(t),i&&i.onMouseEnter(t))}}Rx.defaults={isSvgElement:!0,rootSelector:"root",priority:0,bootstrap:[],actions:{}},function(t){t.Flag=Fx,t.Attr=Lx}(Rx||(Rx={})),function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return(null==n||n===t.toStringTag)&&"function"===typeof i.isNodeView&&"function"===typeof i.isEdgeView&&"function"===typeof i.confirmUpdate}t.toStringTag=`X6.${t.name}`,t.isCellView=e}(Rx||(Rx={})),function(t){function e(t){return function(e){e.config({priority:t})}}function n(t){return function(e){e.config({bootstrap:t})}}t.priority=e,t.bootstrap=n}(Rx||(Rx={})),function(t){t.registry=yv.create({type:"view"})}(Rx||(Rx={}));class $x extends Ex{constructor(t={}){super(),this.svgContainer=this.createContainer(!0,t),this.htmlContainer=this.createContainer(!1,t),this.config(t)}get name(){return this.options.name}get graph(){return this.cellView.graph}get cell(){return this.cellView.cell}get[Symbol.toStringTag](){return $x.toStringTag}createContainer(t,e){const n=t?Ex.createElement("g",!0):Ex.createElement("div",!1);return jm(n,this.prefixClassName("cell-tools")),e.className&&jm(n,e.className),n}config(t){if(this.options=Object.assign(Object.assign({},this.options),t),!Rx.isCellView(t.view)||t.view===this.cellView)return this;this.cellView=t.view,this.cell.isEdge()?(jm(this.svgContainer,this.prefixClassName("edge-tools")),jm(this.htmlContainer,this.prefixClassName("edge-tools"))):this.cell.isNode()&&(jm(this.svgContainer,this.prefixClassName("node-tools")),jm(this.htmlContainer,this.prefixClassName("node-tools"))),this.svgContainer.setAttribute("data-cell-id",this.cell.id),this.htmlContainer.setAttribute("data-cell-id",this.cell.id),this.name&&(this.svgContainer.setAttribute("data-tools-name",this.name),this.htmlContainer.setAttribute("data-tools-name",this.name));const e=this.options.items;if(!Array.isArray(e))return this;this.tools=[];const n=[];e.forEach((t=>{if($x.ToolItem.isToolItem(t))"vertices"===t.name?n.unshift(t):n.push(t);else{const e="object"===typeof t?t.name:t;"vertices"===e?n.unshift(t):n.push(t)}}));for(let i=0;i{t.toolId!==e.cid&&e.isVisible()&&e.update()})),this}focus(t){const e=this.tools;return e&&e.forEach((e=>{t===e?e.show():e.hide()})),this}blur(t){const e=this.tools;return e&&e.forEach((e=>{e===t||e.isVisible()||(e.show(),e.update())})),this}hide(){return this.focus(null)}show(){return this.blur(null)}remove(){const t=this.tools;return t&&(t.forEach((t=>t.remove())),this.tools=null),Qm(this.svgContainer),Qm(this.htmlContainer),super.remove()}mount(){const t=this.tools,e=this.cellView;if(e&&t){const n=t.some((t=>!1!==t.options.isSVGElement)),i=t.some((t=>!1===t.options.isSVGElement));if(n){const t=this.options.local?e.container:e.graph.view.decorator;t.appendChild(this.svgContainer)}i&&this.graph.container.appendChild(this.htmlContainer)}return this}}function zx(t,e,n,i){const s=Em(Dx.presets.pinRelative,this.graph,{},e,n,t,this.cell,i,{});return s.anchor}function Ix(t,e){return e?t.cell.getBBox():t.cell.isEdge()?t.getConnection().bbox():t.getUnrotatedBBoxOfElement(t.container)}(function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return(null==n||n===t.toStringTag)&&null!=i.graph&&null!=i.cell&&"function"===typeof i.config&&"function"===typeof i.update&&"function"===typeof i.focus&&"function"===typeof i.blur&&"function"===typeof i.show&&"function"===typeof i.hide}t.toStringTag=`X6.${t.name}`,t.isToolsView=e})($x||($x={})),function(t){class e extends Ex{constructor(t={}){super(),this.options=this.getOptions(t),this.container=Ex.createElement(this.options.tagName||"g",!1!==this.options.isSVGElement),jm(this.container,this.prefixClassName("cell-tool")),"string"===typeof this.options.className&&jm(this.container,this.options.className),this.init()}static getDefaults(){return this.defaults}static config(t){this.defaults=this.getOptions(t)}static getOptions(t){return kc(ku(this.getDefaults()),t)}get graph(){return this.cellView.graph}get cell(){return this.cellView.cell}get name(){return this.options.name}get[Symbol.toStringTag](){return e.toStringTag}init(){}getOptions(t){const e=this.constructor;return e.getOptions(t)}delegateEvents(){return this.options.events&&super.delegateEvents(this.options.events),this}config(t,e){return this.cellView=t,this.parent=e,this.stamp(this.container),this.cell.isEdge()?jm(this.container,this.prefixClassName("edge-tool")):this.cell.isNode()&&jm(this.container,this.prefixClassName("node-tool")),this.name&&this.container.setAttribute("data-tool-name",this.name),this.delegateEvents(),this}render(){this.empty();const t=this.options.markup;if(t){const e=Nx.isStringMarkup(t)?Nx.parseStringMarkup(t):Nx.parseJSONMarkup(t);this.container.appendChild(e.fragment),this.childNodes=e.selectors}return this.onRender(),this}onRender(){}update(){return this}stamp(t=this.container){t&&t.setAttribute("data-cell-id",this.cellView.cell.id)}show(){return this.container.style.display="",this.visible=!0,this}hide(){return this.container.style.display="none",this.visible=!1,this}isVisible(){return this.visible}focus(){const t=this.options.focusOpacity;return null!=t&&Number.isFinite(t)&&(this.container.style.opacity=`${t}`),this.parent.focus(this),this}blur(){return this.container.style.opacity="",this.parent.blur(this),this}guard(t){return null==this.graph||null==this.cellView||this.graph.view.guard(t,this.cellView)}}e.defaults={isSVGElement:!0,tagName:"g"},t.ToolItem=e,function(t){let e=0;function n(t){return t?Xf(t):(e+=1,`CustomTool${e}`)}function i(t){const e=Gu(n(t.name),this);return e.config(t),e}t.define=i}(e=t.ToolItem||(t.ToolItem={})),function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return(null==n||n===t.toStringTag)&&null!=i.graph&&null!=i.cell&&"function"===typeof i.config&&"function"===typeof i.update&&"function"===typeof i.focus&&"function"===typeof i.blur&&"function"===typeof i.show&&"function"===typeof i.hide&&"function"===typeof i.isVisible}t.toStringTag=`X6.${t.name}`,t.isToolItem=e}(e=t.ToolItem||(t.ToolItem={}))}($x||($x={}));class _x extends $x.ToolItem{onRender(){jm(this.container,this.prefixClassName("cell-tool-button")),this.update()}update(){return this.updatePosition(),this}updatePosition(){const t=this.cellView,e=t.cell.isEdge()?this.getEdgeMatrix():this.getNodeMatrix();rv(this.container,e,{absolute:!0})}getNodeMatrix(){const t=this.cellView,e=this.options;let{x:n=0,y:i=0}=e;const{offset:s,useCellGeometry:r,rotate:o}=e;let a=Ix(t,r);const l=t.cell.getAngle();o||(a=a.bbox(l));let c=0,h=0;"number"===typeof s?(c=s,h=s):"object"===typeof s&&(c=s.x,h=s.y),n=am(n,a.width),i=am(i,a.height);let u=Lb().translate(a.x+a.width/2,a.y+a.height/2);return o&&(u=u.rotate(l)),u=u.translate(n+c-a.width/2,i+h-a.height/2),u}getEdgeMatrix(){const t=this.cellView,e=this.options,{offset:n=0,distance:i=0,rotate:s}=e;let r,o,a;r=om(i)?t.getTangentAtRatio(parseFloat(i)/100):t.getTangentAtLength(i),r?(o=r.start,a=r.vector().vectorAngle(new jy(1,0))||0):(o=t.getConnection().start,a=0);let l=Lb().translate(o.x,o.y).rotate(a);return l="object"===typeof n?l.translate(n.x||0,n.y||0):l.translate(0,n),s||(l=l.rotate(-a)),l}onMouseDown(t){if(this.guard(t))return;t.stopPropagation(),t.preventDefault();const e=this.options.onClick;"function"===typeof e&&Em(e,this.cellView,{e:t,view:this.cellView,cell:this.cellView.cell,btn:this})}}(function(t){t.config({name:"button",events:{mousedown:"onMouseDown",touchstart:"onMouseDown"}})})(_x||(_x={})),function(t){t.Remove=t.define({name:"button-remove",markup:[{tagName:"circle",selector:"button",attrs:{r:7,fill:"#FF1D00",cursor:"pointer"}},{tagName:"path",selector:"icon",attrs:{d:"M -3 -3 3 3 M -3 3 3 -3",fill:"none",stroke:"#FFFFFF","stroke-width":2,"pointer-events":"none"}}],distance:60,offset:0,onClick({view:t,btn:e}){e.parent.remove(),t.cell.remove({ui:!0,toolId:e.cid})}})}(_x||(_x={}));var Vx=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{this.stopHandleListening(t),t.remove()}))}renderHandles(){const t=this.vertices;for(let e=0,n=t.length;ethis.guard(t),attrs:this.options.attrs||{}});s&&s(r),this.graph.hook.onToolItemCreated({name:"vertices",cell:this.cell,view:this.cellView,tool:r}),r.updatePosition(n.x,n.y),this.stamp(r.container),this.container.appendChild(r.container),this.handles.push(r),this.startHandleListening(r)}}updateHandles(){const t=this.vertices;for(let e=0,n=t.length;e0?n[t-1]:e.sourceAnchor,s=t0){const i=this.getNeighborPoints(e),s=i.prev,r=i.next;Math.abs(t.x-s.x)new t.Handle(e),markup:[{tagName:"path",selector:"connection",className:e,attrs:{fill:"none",stroke:"transparent","stroke-width":10,cursor:"pointer"}}],events:{[`mousedown .${e}`]:"onPathMouseDown",[`touchstart .${e}`]:"onPathMouseDown"}})}(Hx||(Hx={}));class Ux extends $x.ToolItem{constructor(){super(...arguments),this.handles=[]}get vertices(){return this.cellView.cell.getVertices()}update(){return this.render(),this}onRender(){jm(this.container,this.prefixClassName("edge-tool-segments")),this.resetHandles();const t=this.cellView,e=[...this.vertices];e.unshift(t.sourcePoint),e.push(t.targetPoint);for(let n=0,i=e.length;nthis.guard(t),attrs:this.options.attrs||{}});return this.options.processHandle&&this.options.processHandle(i),this.graph.hook.onToolItemCreated({name:"segments",cell:this.cell,view:this.cellView,tool:i}),this.updateHandle(i,t,e),this.container.appendChild(i.container),this.startHandleListening(i),i}startHandleListening(t){t.on("change",this.onHandleChange,this),t.on("changing",this.onHandleChanging,this),t.on("changed",this.onHandleChanged,this)}stopHandleListening(t){t.off("change",this.onHandleChange,this),t.off("changing",this.onHandleChanging,this),t.off("changed",this.onHandleChanged,this)}resetHandles(){const t=this.handles;this.handles=[],t&&t.forEach((t=>{this.stopHandleListening(t),t.remove()}))}shiftHandleIndexes(t){const e=this.handles;for(let n=0,i=e.length;nnew t.Handle(e),anchor:zx})}(Ux||(Ux={}));class qx extends $x.ToolItem{get type(){return this.options.type}onRender(){jm(this.container,this.prefixClassName(`edge-tool-${this.type}-anchor`)),this.toggleArea(!1),this.update()}update(){const t=this.type,e=this.cellView,n=e.getTerminalView(t);return n?(this.updateAnchor(),this.updateArea(),this.container.style.display=""):this.container.style.display="none",this}updateAnchor(){const t=this.childNodes;if(!t)return;const e=t.anchor;if(!e)return;const n=this.type,i=this.cellView,s=this.options,r=i.getTerminalAnchor(n),o=i.cell.prop([n,"anchor"]);e.setAttribute("transform",`translate(${r.x}, ${r.y})`);const a=o?s.customAnchorAttrs:s.defaultAnchorAttrs;a&&Object.keys(a).forEach((t=>{e.setAttribute(t,a[t])}))}updateArea(){const t=this.childNodes;if(!t)return;const e=t.area;if(!e)return;const n=this.type,i=this.cellView,s=i.getTerminalView(n);if(s){const t=s.cell,r=i.getTerminalMagnet(n);let o,a,l,c=this.options.areaPadding||0;Number.isFinite(c)||(c=0),s.isEdgeElement(r)?(o=s.getBBox(),a=0,l=o.getCenter()):(o=s.getUnrotatedBBoxOfElement(r),a=t.getAngle(),l=o.getCenter(),a&&l.rotate(-a,t.getBBox().getCenter())),o.inflate(c),hy(e,{x:-o.width/2,y:-o.height/2,width:o.width,height:o.height,transform:`translate(${l.x}, ${l.y}) rotate(${a})`})}}toggleArea(t){if(this.childNodes){const e=this.childNodes.area;e&&(e.style.display=t?"":"none")}}onMouseDown(t){this.guard(t)||(t.stopPropagation(),t.preventDefault(),this.graph.view.undelegateEvents(),this.options.documentEvents&&this.delegateDocumentEvents(this.options.documentEvents),this.focus(),this.toggleArea(this.options.restrictArea),this.cell.startBatch("move-anchor",{ui:!0,toolId:this.cid}))}resetAnchor(t){const e=this.type,n=this.cell;t?n.prop([e,"anchor"],t,{rewrite:!0,ui:!0,toolId:this.cid}):n.removeProp([e,"anchor"],{ui:!0,toolId:this.cid})}onMouseMove(t){const e=this.type,n=this.cellView,i=n.getTerminalView(e);if(null==i)return;const s=this.normalizeEvent(t),r=i.cell,o=n.getTerminalMagnet(e);let a=this.graph.clientToLocal(s.clientX,s.clientY);const l=this.options.snap;if("function"===typeof l){const t=Em(l,n,a,i,o,e,n,this);a=jy.create(t)}if(this.options.restrictArea)if(i.isEdgeElement(o)){const t=i.getClosestPoint(a);t&&(a=t)}else{const t=i.getUnrotatedBBoxOfElement(o),e=r.getAngle(),n=r.getBBox().getCenter(),s=a.clone().rotate(e,n);t.containsPoint(s)||(a=t.getNearestPointToPoint(s).rotate(-e,n))}let c;const h=this.options.anchor;"function"===typeof h&&(c=Em(h,n,a,i,o,e,n,this)),this.resetAnchor(c),this.update()}onMouseUp(t){this.graph.view.delegateEvents(),this.undelegateDocumentEvents(),this.blur(),this.toggleArea(!1);const e=this.cellView;this.options.removeRedundancies&&e.removeRedundantLinearVertices({ui:!0,toolId:this.cid}),this.cell.stopBatch("move-anchor",{ui:!0,toolId:this.cid})}onDblClick(){const t=this.options.resetAnchor;t&&this.resetAnchor(!0===t?void 0:t),this.update()}}(function(t){t.config({tagName:"g",markup:[{tagName:"circle",selector:"anchor",attrs:{cursor:"pointer"}},{tagName:"rect",selector:"area",attrs:{"pointer-events":"none",fill:"none",stroke:"#33334F","stroke-dasharray":"2,4",rx:5,ry:5}}],events:{mousedown:"onMouseDown",touchstart:"onMouseDown",dblclick:"onDblClick"},documentEvents:{mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},customAnchorAttrs:{"stroke-width":4,stroke:"#33334F",fill:"#FFFFFF",r:5},defaultAnchorAttrs:{"stroke-width":2,stroke:"#FFFFFF",fill:"#33334F",r:6},areaPadding:6,snapRadius:10,resetAnchor:!0,restrictArea:!0,removeRedundancies:!0,anchor:zx,snap(t,e,n,i,s,r){const o=r.options.snapRadius||0,a="source"===i,l=a?0:-1,c=this.cell.getVertexAt(l)||this.getTerminalAnchor(a?"target":"source");return c&&(Math.abs(c.x-t.x){this.editor.focus(),this.selectText()}))}selectText(){if(window.getSelection){const t=document.createRange(),e=window.getSelection();t.selectNodeContents(this.editor),e.removeAllRanges(),e.addRange(t)}}}(function(t){t.config({tagName:"div",isSVGElement:!1,events:{dblclick:"onDblClick",mousedown:"onMouseDown"},documentEvents:{mousedown:"onDocumentMouseDown"}})})(Qx||(Qx={})),function(t){t.NodeEditor=t.define({attrs:{fontSize:14,fontFamily:"Arial, helvetica, sans-serif",color:"#000",backgroundColor:"#fff"},getText({cell:t}){return t.attr("text/text")},setText({cell:t,value:e}){t.attr("text/text",e)}}),t.EdgeEditor=t.define({attrs:{fontSize:14,fontFamily:"Arial, helvetica, sans-serif",color:"#000",backgroundColor:"#fff"},labelAddable:!0,getText({cell:t,index:e}){return-1===e?"":t.prop(`labels/${e}/attrs/label/text`)},setText({cell:t,value:e,index:n,distance:i}){const s=t;-1===n?s.appendLabel({position:{distance:i},attrs:{label:{text:e}}}):e?s.prop(`labels/${n}/attrs/label/text`,e):"number"===typeof n&&s.removeLabelAt(n)}})}(Qx||(Qx={}));var tE,eE,nE=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s1&&(s/=100),t.getPointAtRatio(s)},xE=function(t,e,n,i){const s=null!=i.length?i.length:20;return t.getPointAtLength(s)},EE=function(t,e,n,i){const s=t.getClosestPoint(n);return null!=s?s:new jy},SE=pE(EE),AE=function(t,e,n,i){const s=1e6,r=t.getConnection(),o=t.getConnectionSubdivisions(),a=new Fy(n.clone().translate(0,s),n.clone().translate(0,-s)),l=new Fy(n.clone().translate(s,0),n.clone().translate(-s,0)),c=a.intersect(r,{segmentSubdivisions:o}),h=l.intersect(r,{segmentSubdivisions:o}),u=[];return c&&u.push(...c),h&&u.push(...h),u.length>0?n.closest(u):null!=i.fallbackAt?gE(t,i.fallbackAt):Em(EE,this,t,e,n,i)},ME=pE(AE);var kE;function OE(t,e,n){let i;if("object"===typeof n){if(Number.isFinite(n.y)){const i=new Fy(e,t),{start:s,end:r}=i.parallel(n.y);e=s,t=r}i=n.x}else i=n;if(null==i||!Number.isFinite(i))return t;const s=t.distance(e);return 0===i&&s>0?t:t.move(e,-Math.min(i,s-1))}function PE(t){const e=t.getAttribute("stroke-width");return null===e?0:parseFloat(e)||0}function TE(t){if(null==t)return null;let e=t;do{let t=e.tagName;if("string"!==typeof t)return null;if(t=t.toUpperCase(),"G"===t)e=e.firstElementChild;else{if("TITLE"!==t)break;e=e.nextElementSibling}}while(e);return e}(function(t){t.presets=p,t.registry=yv.create({type:"edge endpoint"}),t.registry.register(t.presets,!0)})(kE||(kE={}));const DE=function(t,e,n,i){const s=e.getBBoxOfElement(n);i.stroked&&s.inflate(PE(n)/2);const r=t.intersect(s),o=r&&r.length?t.start.closest(r):t.end;return OE(o,t.start,i.offset)},NE=function(t,e,n,i,s){const r=e.cell,o=r.isNode()?r.getAngle():0;if(0===o)return Em(DE,this,t,e,n,i,s);const a=e.getUnrotatedBBoxOfElement(n);i.stroked&&a.inflate(PE(n)/2);const l=a.getCenter(),c=t.clone().rotate(o,l),h=c.setLength(1e6).intersect(a),u=h&&h.length?c.start.closest(h).rotate(-o,l):t.end;return OE(u,t.start,i.offset)},jE=function(t,e,n,i){let s,r;const o=t.end,a=i.selector;if(s="string"===typeof a?e.findOne(a):Array.isArray(a)?Uu(n,a):TE(n),!zm(s)){if(s===n||!zm(n))return o;s=n}const l=e.getShapeOfElement(s),c=e.getMatrixOfElement(s),h=e.getRootTranslatedMatrix(),u=e.getRootRotatedMatrix(),d=h.multiply(u).multiply(c),p=d.inverse(),g=Ub(t,p),f=g.start.clone(),m=e.getDataOfElement(s);if(!1===i.insideout){null==m.shapeBBox&&(m.shapeBBox=l.bbox());const t=m.shapeBBox;if(null!=t&&t.containsPoint(f))return o}let y;if(!0===i.extrapolate&&g.setLength(1e6),sb.isPath(l)){const t=i.precision||2;null==m.segmentSubdivisions&&(m.segmentSubdivisions=l.getSegmentSubdivisions({precision:t})),y={precision:t,segmentSubdivisions:m.segmentSubdivisions},r=g.intersect(l,y)}else r=g.intersect(l);r?Array.isArray(r)&&(r=f.closest(r)):!0===i.sticky&&(r=Ly.isRectangle(l)?l.getNearestPointToPoint(f):By.isEllipse(l)?l.intersectsWithLineFromCenterToPoint(f):l.closestPoint(f,y));const b=r?Hb(r,d):o;let v=i.offset||0;return!1!==i.stroked&&("object"===typeof v?(v=Object.assign({},v),null==v.x&&(v.x=0),v.x+=PE(s)/2):v+=PE(s)/2),OE(b,t.start,v)};function LE(t,e,n=0){const{start:i,end:s}=t;let r,o,a,l;switch(e){case"left":l="x",r=s,o=i,a=-1;break;case"right":l="x",r=i,o=s,a=1;break;case"top":l="y",r=s,o=i,a=-1;break;case"bottom":l="y",r=i,o=s,a=1;break;default:return}i[l]0?l[c]=a[c]:a[c]=l[c],[a.toJSON(),...t,l.toJSON()]};function zE(t){return new Ly(t.x,t.y,0,0)}function IE(t={}){const e=cm(t.padding||20);return{x:-e.left,y:-e.top,width:e.left+e.right,height:e.top+e.bottom}}function _E(t,e={}){return t.sourceBBox.clone().moveAndExpand(IE(e))}function VE(t,e={}){return t.targetBBox.clone().moveAndExpand(IE(e))}function GE(t,e={}){if(t.sourceAnchor)return t.sourceAnchor;const n=_E(t,e);return n.getCenter()}function HE(t,e={}){if(t.targetAnchor)return t.targetAnchor;const n=VE(t,e);return n.getCenter()}const UE=function(t,e,n){let i=_E(n,e),s=VE(n,e);const r=GE(n,e),o=HE(n,e);i=i.union(zE(r)),s=s.union(zE(o));const a=t.map((t=>jy.create(t)));a.unshift(r),a.push(o);let l=null;const c=[];for(let h=0,u=a.length-1;he.y?"N":"S":t.y===e.y?t.x>e.x?"W":"E":null}function o(t,n,i){const s=new jy(t.x,n.y),o=new jy(n.x,t.y),a=r(t,s),l=r(t,o),c=i?e[i]:null,h=a===i||a!==c&&(l===c||l!==i)?s:o;return{points:[h],direction:r(h,n)}}function a(t,e,n){const s=i(t,e,n);return{points:[s],direction:r(s,e)}}function l(t,e,n,o){const a=[new jy(t.x,e.y),new jy(e.x,t.y)],l=a.filter((t=>!n.containsPoint(t))),c=l.filter((e=>r(e,t)!==o));let h;if(c.length>0)return h=c.filter((e=>r(t,e)===o)).pop(),h=h||c[0],{points:[h],direction:r(h,e)};{h=al(a,l)[0];const c=jy.create(e).move(h,-s(n,o)/2),u=i(c,t,n);return{points:[u,c],direction:r(c,e)}}}function c(t,e,n,i){let l=a(e,t,i);const c=l.points[0];if(n.containsPoint(c)){l=a(t,e,n);const h=l.points[0];if(i.containsPoint(h)){const u=jy.create(t).move(h,-s(n,r(t,h))/2),d=jy.create(e).move(c,-s(i,r(e,c))/2),p=new Fy(u,d).getCenter(),g=a(t,p,n),f=o(p,e,g.direction);l.points=[g.points[0],f.points[0]],l.direction=f.direction}}return l}function h(t,e,s,o,a){const l=s.union(o).inflate(1),c=l.getCenter(),h=c.distance(e)>c.distance(t),u=h?e:t,d=h?t:e;let p,g,f,m;a?(p=jy.fromPolar(l.width+l.height,n[a],u),p=l.getNearestPointToPoint(p).move(p,-1)):p=l.getNearestPointToPoint(u).move(u,1),g=i(p,d,l),p.round().equals(g.round())?(g=jy.fromPolar(l.width+l.height,Ay.toRad(p.theta(u))+Math.PI/2,d),g=l.getNearestPointToPoint(g).move(d,1).round(),f=i(p,g,l),m=h?[g,f,p]:[p,f,g]):m=h?[g,p]:[p,g];const y=r(h?p:g,e);return{points:m,direction:y}}t.getBBoxSize=s,t.getBearing=r,t.vertexToVertex=o,t.nodeToVertex=a,t.vertexToNode=l,t.nodeToNode=c,t.insideNode=h})(qE||(qE={}));const WE={step:10,maxLoopCount:2e3,precision:1,maxDirectionChange:90,perpendicular:!0,excludeTerminals:[],excludeShapes:[],excludeHiddenNodes:!1,startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{top:{x:0,y:-1},right:{x:1,y:0},bottom:{x:0,y:1},left:{x:-1,y:0}},cost(){const t=XE(this.step,this);return t},directions(){const t=XE(this.step,this),e=XE(this.cost,this);return[{cost:e,offsetX:t,offsetY:0},{cost:e,offsetX:-t,offsetY:0},{cost:e,offsetX:0,offsetY:t},{cost:e,offsetX:0,offsetY:-t}]},penalties(){const t=XE(this.step,this);return{0:0,45:t/2,90:t/2}},paddingBox(){const t=XE(this.step,this);return{x:-t,y:-t,width:2*t,height:2*t}},fallbackRouter:UE,draggingRouter:null};function XE(t,e){return"function"===typeof t?t.call(e):t}function YE(t){const e=Object.keys(t).reduce(((e,n)=>{const i=e;return i[n]="fallbackRouter"===n||"draggingRouter"===n||"fallbackRoute"===n?t[n]:XE(t[n],t),e}),{});if(e.padding){const n=cm(e.padding);t.paddingBox={x:-n.left,y:-n.top,width:n.left+n.right,height:n.top+n.bottom}}return e.directions.forEach((t=>{const e=new jy(0,0),n=new jy(t.offsetX,t.offsetY);t.angle=Ay.normalize(e.theta(n))})),e}const JE=1,ZE=2;class KE{constructor(){this.items=[],this.hash={},this.values={}}add(t,e){this.hash[t]?this.items.splice(this.items.indexOf(t),1):this.hash[t]=JE,this.values[t]=e;const n=Ca(this.items,t,(t=>this.values[t]));this.items.splice(n,0,t)}pop(){const t=this.items.shift();return t&&(this.hash[t]=ZE),t}isOpen(t){return this.hash[t]===JE}isClose(t){return this.hash[t]===ZE}isEmpty(){return 0===this.items.length}}class QE{constructor(t){this.options=t,this.mapGridSize=100,this.map={}}build(t,e){const n=this.options,i=n.excludeTerminals.reduce(((n,i)=>{const s=e[i];if(s){const e=t.getCell(s.cell);e&&n.push(e)}return n}),[]);let s=[];const r=t.getCell(e.getSourceCellId());r&&(s=Qn(s,r.getAncestors().map((t=>t.id))));const o=t.getCell(e.getTargetCellId());o&&(s=Qn(s,o.getAncestors().map((t=>t.id))));const a=this.mapGridSize;return t.getNodes().reduce(((t,e)=>{const r=e.shape,o=n.excludeShapes,l=!!r&&o.includes(r),c=i.some((t=>t.id===e.id)),h=s.includes(e.id),u=n.excludeHiddenNodes&&!e.isVisible(),d=l||c||h||u;if(!d){const i=e.getBBox().moveAndExpand(n.paddingBox),s=i.getOrigin().snapToGrid(a),r=i.getCorner().snapToGrid(a);for(let e=s.x;e<=r.x;e+=a)for(let n=s.y;n<=r.y;n+=a){const s=new jy(e,n).toString();null==t[s]&&(t[s]=[]),t[s].push(i)}}return t}),this.map),this}isAccessible(t){const e=t.clone().snapToGrid(this.mapGridSize).toString(),n=this.map[e];return!n||n.every((e=>!e.containsPoint(t)))}}function tS(t,e){const n=t.sourceBBox.clone();return e&&e.paddingBox?n.moveAndExpand(e.paddingBox):n}function eS(t,e){const n=t.targetBBox.clone();return e&&e.paddingBox?n.moveAndExpand(e.paddingBox):n}function nS(t,e){if(t.sourceAnchor)return t.sourceAnchor;const n=tS(t,e);return n.getCenter()}function iS(t,e){if(t.targetAnchor)return t.targetAnchor;const n=eS(t,e);return n.getCenter()}function sS(t,e,n,i,s){const r=360/n,o=t.theta(rS(t,e,i,s)),a=Ay.normalize(o+r/2);return r*Math.floor(a/r)}function rS(t,e,n,i){const s=i.step,r=e.x-t.x,o=e.y-t.y,a=r/n.x,l=o/n.y,c=a*s,h=l*s;return new jy(t.x+c,t.y+h)}function oS(t,e){const n=Math.abs(t-e);return n>180?360-n:n}function aS(t,e){const n=e.step;return e.directions.forEach((e=>{e.gridOffsetX=e.offsetX/n*t.x,e.gridOffsetY=e.offsetY/n*t.y})),e.directions}function lS(t,e,n){return{source:e.clone(),x:cS(n.x-e.x,t),y:cS(n.y-e.y,t)}}function cS(t,e){if(!t)return e;const n=Math.abs(t),i=Math.round(n/e);if(!i)return n;const s=i*e,r=n-s,o=r/i;return e+o}function hS(t,e){const n=e.source,i=ww.snapToGrid(t.x-n.x,e.x)+n.x,s=ww.snapToGrid(t.y-n.y,e.y)+n.y;return new jy(i,s)}function uS(t,e){return t.round(e)}function dS(t,e,n){return uS(hS(t.clone(),e),n)}function pS(t){return t.toString()}function gS(t){return new jy(0===t.x?0:Math.abs(t.x)/t.x,0===t.y?0:Math.abs(t.y)/t.y)}function fS(t,e){let n=1/0;for(let i=0,s=e.length;i{if(n.includes(l)){const n=o[l],c=new jy(t.x+n.x*(Math.abs(a.x)+e.width),t.y+n.y*(Math.abs(a.y)+e.height)),h=new Fy(t,c),u=h.intersect(e)||[];let d,p=null;for(let e=0;ed)&&(d=i,p=n)}if(p){let t=dS(p,i,r);e.containsPoint(t)&&(t=dS(t.translate(n.x*i.x,n.y*i.y),i,r)),s.push(t)}}return s}),[]);return e.containsPoint(t)||l.push(dS(t,i,r)),l}function yS(t,e,n,i,s){const r=[];let o,a=gS(s.diff(n)),l=pS(n),c=t[l];while(c){o=e[l];const n=gS(o.diff(c));n.equals(a)||(r.unshift(o),a=n),l=pS(c),c=t[l]}const h=e[l],u=gS(h.diff(i));return u.equals(a)||r.unshift(h),r}function bS(t,e,n,i,s){const r=s.precision;let o,a;o=Ly.isRectangle(e)?uS(nS(t,s).clone(),r):uS(e.clone(),r),a=Ly.isRectangle(n)?uS(iS(t,s).clone(),r):uS(n.clone(),r);const l=lS(s.step,o,a),c=o,h=a;let u,d;if(u=Ly.isRectangle(e)?mS(c,e,s.startDirections,l,s):[c],d=Ly.isRectangle(n)?mS(a,n,s.endDirections,l,s):[h],u=u.filter((t=>i.isAccessible(t))),d=d.filter((t=>i.isAccessible(t))),u.length>0&&d.length>0){const t=new KE,e={},n={},o={};for(let i=0,s=u.length;i{const n=pS(e);return t.push(n),t}),[]),v=jy.equalPoints(u,d);let C=s.maxLoopCount;while(!t.isEmpty()&&C>0){const u=t.pop(),w=e[u],x=n[u],E=o[u],S=w.equals(c),A=null==x;let M;M=A?p?S?null:sS(c,w,y,l,s):a:sS(x,w,y,l,s);const k=A&&v;if(!k&&b.indexOf(u)>=0)return s.previousDirectionAngle=M,yS(n,e,w,c,h);for(let a=0;as.maxDirectionChange)continue;const u=dS(w.clone().translate(g.gridOffsetX||0,g.gridOffsetY||0),l,r),v=pS(u);if(t.isClose(v)||!i.isAccessible(u))continue;if(b.indexOf(v)>=0){const t=u.equals(h);if(!t){const t=sS(u,h,y,l,s),e=oS(c,t);if(e>s.maxDirectionChange)continue}}const C=g.cost,x=S?0:s.penalties[f],A=E+C+x;(!t.isOpen(v)||Ajy.create(t))),c=[];let h,u,d=o;for(let p=0,g=l.length;p<=g;p+=1){let e=null;if(h=u||s,u=l[p],null==u){u=r;const t=n.cell,a=null==t.getSourceCellId()||null==t.getTargetCellId();if(a&&"function"===typeof i.draggingRouter){const t=h===s?o:h,r=u.getOrigin();e=Em(i.draggingRouter,n,t,r,i)}}if(null==e&&(e=bS(n,h,u,a,i)),null===e)return Em(i.fallbackRouter,this,t,i,n);const g=e[0];g&&g.equals(d)&&e.shift(),d=e[e.length-1]||d,c.push(...e)}return c},CS=function(t,e,n){return Em(vS,this,t,Object.assign(Object.assign({},WE),e),n)},wS={maxDirectionChange:45,directions(){const t=XE(this.step,this),e=XE(this.cost,this),n=Math.ceil(Math.sqrt(t*t<<1));return[{cost:e,offsetX:t,offsetY:0},{cost:n,offsetX:t,offsetY:t},{cost:e,offsetX:0,offsetY:t},{cost:n,offsetX:-t,offsetY:t},{cost:e,offsetX:-t,offsetY:0},{cost:n,offsetX:-t,offsetY:-t},{cost:e,offsetX:0,offsetY:-t},{cost:n,offsetX:t,offsetY:-t}]},fallbackRoute(t,e,n){const i=t.theta(e),s=[];let r={x:e.x,y:t.y},o={x:t.x,y:e.y};if(i%180>90){const t=r;r=o,o=t}const a=i%90<45?r:o,l=new Fy(t,a),c=90*Math.ceil(i/90),h=jy.fromPolar(l.squaredLength(),Ay.toRad(c+135),a),u=new Fy(e,h),d=l.intersectsWithLine(u),p=d||e,g=d?p:t,f=360/n.directions.length,m=g.theta(e),y=Ay.normalize(m+f/2),b=f*Math.floor(y/f);return n.previousDirectionAngle=b,p&&s.push(p.round()),s.push(e),s}},xS=function(t,e,n){return Em(CS,this,t,Object.assign(Object.assign({},wS),e),n)},ES=function(t,e,n){const i=e.offset||32,s=null==e.min?16:e.min;let r=0,o=e.direction;const a=n.sourceBBox,l=n.targetBBox,c=a.getCenter(),h=l.getCenter();if("number"===typeof i&&(r=i),null==o){let t=l.left-a.right,e=l.top-a.bottom;t>=0&&e>=0?o=t>=e?"L":"T":t<=0&&e>=0?(t=a.left-l.right,o=t>=0&&t>=e?"R":"T"):t>=0&&e<=0?(e=a.top-l.bottom,o=e>=0?t>=e?"L":"B":"L"):(t=a.left-l.right,e=a.top-l.bottom,o=t>=0&&e>=0?t>=e?"R":"B":t<=0&&e>=0?"B":t>=0&&e<=0||Math.abs(t)>Math.abs(e)?"R":"B")}let u,d,p;"H"===o?o=h.x-c.x>=0?"L":"R":"V"===o&&(o=h.y-c.y>=0?"T":"B"),"center"===i&&("L"===o?r=(l.left-a.right)/2:"R"===o?r=(a.left-l.right)/2:"T"===o?r=(l.top-a.bottom)/2:"B"===o&&(r=(a.top-l.bottom)/2));const g="L"===o||"R"===o;if(g){if(h.y===c.y)return[...t];p="L"===o?1:-1,u="x",d="width"}else{if(h.x===c.x)return[...t];p="T"===o?1:-1,u="y",d="height"}const f=c.clone(),m=h.clone();if(f[u]+=p*(a[d]/2+r),m[u]-=p*(l[d]/2+r),g){const t=f.x,e=m.x,n=a.width/2+s,i=l.width/2+s;h.x>c.x?e<=t&&(f.x=Math.max(e,c.x+n),m.x=Math.min(t,h.x-i)):e>=t&&(f.x=Math.min(e,c.x-n),m.x=Math.max(t,h.x+i))}else{const t=f.y,e=m.y,n=a.height/2+s,i=l.height/2+s;h.y>c.y?e<=t&&(f.y=Math.max(e,c.y+n),m.y=Math.min(t,h.y-i)):e>=t&&(f.y=Math.min(e,c.y-n),m.y=Math.max(t,h.y+i))}return[f.toJSON(),...t,m.toJSON()]};function SS(t,e){if(null!=e&&!1!==e){const n="boolean"===typeof e?0:e;if(n>0){const e=jy.create(t[1]).move(t[2],n),i=jy.create(t[1]).move(t[0],n);return[e.toJSON(),...t,i.toJSON()]}{const e=t[1];return[Object.assign({},e),...t,Object.assign({},e)]}}return t}const AS=function(t,e,n){const i=e.width||50,s=e.height||80,r=s/2,o=e.angle||"auto",a=n.sourceAnchor,l=n.targetAnchor,c=n.sourceBBox,h=n.targetBBox;if(a.equals(l)){const t=t=>{const e=Ay.toRad(t),n=Math.sin(e),s=Math.cos(e),o=new jy(a.x+s*i,a.y+n*i),l=new jy(o.x-s*r,o.y-n*r),c=l.clone().rotate(-90,o),h=l.clone().rotate(90,o);return[c.toJSON(),o.toJSON(),h.toJSON()]},n=t=>{const e=a.clone().move(t,-1),n=new Fy(e,t);return!c.containsPoint(t)&&!c.intersectsWithLine(n)},s=[0,90,180,270,45,135,225,315];if("number"===typeof o)return SS(t(o),e.merge);const l=c.getCenter();if(l.equals(a))return SS(t(0),e.merge);const h=l.angleBetween(a,l.clone().translate(1,0));let u=t(h);if(n(u[1]))return SS(u,e.merge);for(let i=1,r=s.length;i1&&(r.rotate(180-i,n),o.rotate(180-i,n),a.rotate(180-i,n))}const l=`\n M ${t.x} ${t.y}\n Q ${r.x} ${r.y} ${a.x} ${a.y}\n Q ${o.x} ${o.y} ${e.x} ${e.y}\n `;return i.raw?sb.parse(l):l},PS=function(t,e,n,i={}){const s=new sb;s.appendSegment(sb.createSegment("M",t));const r=1/3,o=2/3,a=i.radius||10;let l,c;for(let h=0,u=n.length;h=Math.abs(t.y-e.y)?"H":"V"),"H"===r){const n=(t.x+e.x)/2;s.appendSegment(sb.createSegment("C",n,t.y,n,e.y,e.x,e.y))}else{const n=(t.y+e.y)/2;s.appendSegment(sb.createSegment("C",t.x,n,e.x,n,e.x,e.y))}return i.raw?s:s.serialize()},DS=1,NS=1/3,jS=2/3;function LS(t){let e=t.graph._jumpOverUpdateList;if(null==e&&(e=t.graph._jumpOverUpdateList=[],t.graph.on("cell:mouseup",(()=>{const e=t.graph._jumpOverUpdateList;for(let t=0;t{e=t.graph._jumpOverUpdateList=[]}))),e.indexOf(t)<0){e.push(t);const n=()=>e.splice(e.indexOf(t),1);t.cell.once("change:connector",n),t.cell.once("removed",n)}}function FS(t,e,n=[]){const i=[t,...n,e],s=[];return i.forEach(((t,e)=>{const n=i[e+1];null!=n&&s.push(new Fy(t,n))})),s}function BS(t,e){const n=[];return e.forEach((e=>{const i=t.intersectsWithLine(e);i&&n.push(i)})),n}function RS(t,e){return new Fy(t,e).squaredLength()}function $S(t,e,n){return e.reduce(((i,s,r)=>{if(VS.includes(s))return i;const o=i.pop()||t,a=jy.create(s).move(o.start,-n);let l=jy.create(s).move(o.start,+n);const c=e[r+1];if(null!=c){const t=l.distance(c);t<=n&&(l=c.move(o.start,t),VS.push(c))}else{const t=a.distance(o.end);if(t<2*n+DS)return i.push(o),i}const h=l.distance(o.start);if(h<2*n+DS)return i.push(o),i;const u=new Fy(a,l);return _S.push(u),i.push(new Fy(o.start,a),u,new Fy(l,o.end)),i}),[])}function zS(t,e,n,i){const s=new sb;let r;return r=sb.createSegment("M",t[0].start),s.appendSegment(r),t.forEach(((o,a)=>{if(_S.includes(o)){let t,i,a,l;if("arc"===n){t=-90,i=o.start.diff(o.end);const e=i.x<0||0===i.x&&i.y<0;e&&(t+=180);const n=o.getCenter(),c=new Fy(n,o.end).rotate(t,n);let h;h=new Fy(o.start,n),a=h.pointAt(2/3).rotate(t,o.start),l=c.pointAt(1/3).rotate(-t,c.end),r=sb.createSegment("C",a,l,c.end),s.appendSegment(r),h=new Fy(n,o.end),a=c.pointAt(1/3).rotate(t,c.end),l=h.pointAt(1/3).rotate(-t,o.end),r=sb.createSegment("C",a,l,o.end),s.appendSegment(r)}else if("gap"===n)r=sb.createSegment("M",o.end),s.appendSegment(r);else if("cubic"===n){t=o.start.theta(o.end);const n=.6*e;let c=1.35*e;i=o.start.diff(o.end);const h=i.x<0||0===i.x&&i.y<0;h&&(c*=-1),a=new jy(o.start.x+n,o.start.y+c).rotate(t,o.start),l=new jy(o.end.x-n,o.end.y+c).rotate(t,o.end),r=sb.createSegment("C",a,l,o.end),s.appendSegment(r)}}else{const e=t[a+1];0===i||!e||_S.includes(e)?(r=sb.createSegment("L",o.end),s.appendSegment(r)):IS(i,s,o.end,o.start,e.end)}})),s}function IS(t,e,n,i,s){const r=n.distance(i)/2,o=n.distance(s)/2,a=-Math.min(t,r),l=-Math.min(t,o),c=n.clone().move(i,a).round(),h=n.clone().move(s,l).round(),u=new jy(NS*c.x+jS*n.x,jS*n.y+NS*c.y),d=new jy(NS*h.x+jS*n.x,jS*n.y+NS*h.y);let p;p=sb.createSegment("L",c),e.appendSegment(p),p=sb.createSegment("C",u,d,h),e.appendSegment(p)}let _S,VS;const GS=function(t,e,n,i={}){_S=[],VS=[],LS(this);const s=i.size||5,r=i.type||"arc",o=i.radius||0,a=i.ignoreConnectors||["smooth"],l=this.graph,c=l.model,h=c.getEdges();if(1===h.length)return zS(FS(t,e,n),s,r,o);const u=this.cell,d=h.indexOf(u),p=l.options.connecting.connector||{},g=h.filter(((t,e)=>{const n=t.getConnector()||p;return!a.includes(n.name)&&(!(e>d)||"jumpover"!==n.name)})),f=g.map((t=>l.renderer.findViewByCell(t))),m=FS(t,e,n),y=f.map((t=>null==t?[]:t===this?m:FS(t.sourcePoint,t.targetPoint,t.routePoints))),b=[];m.forEach((t=>{const e=g.reduce(((e,n,i)=>{if(n!==u){const n=BS(t,y[i]);e.push(...n)}return e}),[]).sort(((e,n)=>RS(t.start,e)-RS(t.start,n)));e.length>0?b.push(...$S(t,e,s)):b.push(t)}));const v=zS(b,s,r,o);return _S=[],VS=[],i.raw?v:v.serialize()};var HS;(function(t){t.presets=m,t.registry=yv.create({type:"connector"}),t.registry.register(t.presets,!0)})(HS||(HS={}));yv.create;class US{constructor(t){this.cell=t,this.ids={},this.cache={}}get(){return Object.keys(this.ids)}start(t,e,n={},i="/"){const s=this.cell.getPropByPath(t),r=Du(n,US.defaultOptions),o=this.getTiming(r.timing),a=this.getInterp(r.interp,s,e);let l=0;const c=Array.isArray(t)?t.join(i):t,h=Array.isArray(t)?t:t.split(i),u=()=>{const t=(new Date).getTime();0===l&&(l=t);const e=t-l;let i=e/r.duration;i<1?this.ids[c]=xy(u):i=1;const s=a(o(i));this.cell.setPropByPath(h,s),n.progress&&n.progress(Object.assign({progress:i,currentValue:s},this.getArgs(c))),1===i&&(this.cell.notify("transition:end",this.getArgs(c)),this.cell.notify("transition:complete",this.getArgs(c)),n.complete&&n.complete(this.getArgs(c)),this.cell.notify("transition:finish",this.getArgs(c)),n.finish&&n.finish(this.getArgs(c)),this.clean(c))};return setTimeout((()=>{this.stop(t,void 0,i),this.cache[c]={startValue:s,targetValue:e,options:r},this.ids[c]=xy(u),this.cell.notify("transition:begin",this.getArgs(c)),this.cell.notify("transition:start",this.getArgs(c)),n.start&&n.start(this.getArgs(c))}),n.delay),this.stop.bind(this,t,i,n)}stop(t,e={},n="/"){const i=Array.isArray(t)?t:t.split(n);return Object.keys(this.ids).filter((t=>Pc(i,t.split(n).slice(0,i.length)))).forEach((t=>{Ey(this.ids[t]);const n=this.cache[t],i=this.getArgs(t),s=Object.assign(Object.assign({},n.options),e),r=s.jumpedToEnd;r&&null!=n.targetValue&&(this.cell.setPropByPath(t,n.targetValue),this.cell.notify("transition:end",Object.assign({},i)),this.cell.notify("transition:complete",Object.assign({},i)),s.complete&&s.complete(Object.assign({},i)));const o=Object.assign({jumpedToEnd:r},i);this.cell.notify("transition:stop",Object.assign({},o)),s.stop&&s.stop(Object.assign({},o)),this.cell.notify("transition:finish",Object.assign({},i)),s.finish&&s.finish(Object.assign({},i)),this.clean(t)})),this}clean(t){delete this.ids[t],delete this.cache[t]}getTiming(t){return"string"===typeof t?mx[t]:t}getInterp(t,e,n){return t?t(e,n):"number"===typeof n?yx.number(e,n):"string"===typeof n?"#"===n[0]?yx.color(e,n):yx.unit(e,n):yx.object(e,n)}getArgs(t){const e=this.cache[t];return{path:t,startValue:e.startValue,targetValue:e.targetValue,cell:this.cell}}}(function(t){t.defaultOptions={delay:10,duration:100,timing:"linear"}})(US||(US={}));var qS=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class WS extends px{constructor(t={}){super(),this.pending=!1,this.changing=!1,this.data={},this.mutate(ku(t)),this.changed={}}mutate(t,e={}){const n=!0===e.unset,i=!0===e.silent,s=[],r=this.changing;this.changing=!0,r||(this.previous=ku(this.data),this.changed={});const o=this.data,a=this.previous,l=this.changed;if(Object.keys(t).forEach((e=>{const i=e,r=t[i];Pc(o[i],r)||s.push(i),Pc(a[i],r)?delete l[i]:l[i]=r,n?delete o[i]:o[i]=r})),!i&&s.length>0&&(this.pending=!0,this.pendingOptions=e,s.forEach((t=>{this.emit("change:*",{key:t,options:e,store:this,current:o[t],previous:a[t]})}))),r)return this;if(!i)while(this.pending)this.pending=!1,this.emit("changed",{current:o,previous:a,store:this,options:this.pendingOptions});return this.pending=!1,this.changing=!1,this.pendingOptions=null,this}get(t,e){if(null==t)return this.data;const n=this.data[t];return null==n?e:n}getPrevious(t){if(this.previous){const e=this.previous[t];return null==e?void 0:e}}set(t,e,n){return null!=t&&("object"===typeof t?this.mutate(t,e):this.mutate({[t]:e},n)),this}remove(t,e){const n=void 0,i={};let s;if("string"===typeof t)i[t]=n,s=e;else if(Array.isArray(t))t.forEach((t=>i[t]=n)),s=e;else{for(const t in this.data)i[t]=n;s=t}return this.mutate(i,Object.assign(Object.assign({},s),{unset:!0})),this}getByPath(t){return Uu(this.data,t,"/")}setByPath(t,e,n={}){const i="/",s=Array.isArray(t)?[...t]:t.split(i),r=Array.isArray(t)?t.join(i):t,o=s[0],a=s.length;if(n.propertyPath=r,n.propertyValue=e,n.propertyPathArray=s,1===a)this.set(o,e,n);else{const r={};let l=r,c=o;for(let t=1;t0:t in this.changed}getChanges(t){if(null==t)return this.hasChanged()?ku(this.changed):null;const e=this.changing?this.previous:this.data,n={};let i;for(const s in t){const r=t[s];Pc(e[s],r)||(n[s]=r,i=!0)}return i?ku(n):null}toJSON(){return ku(this.data)}clone(){const t=this.constructor;return new t(this.data)}dispose(){this.off(),this.data={},this.previous={},this.changed={},this.pending=!1,this.changing=!1,this.pendingOptions=null,this.trigger("disposed",{store:this})}}qS([px.dispose()],WS.prototype,"dispose",null);var XS,YS=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},JS=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{const e=n[t];"function"===typeof e&&this.propHooks.push(e)}))),i&&(this.attrHooks=Object.assign(Object.assign({},this.attrHooks),i)),this.defaults=kc({},this.defaults,s)}static getMarkup(){return this.markup}static getDefaults(t){return t?this.defaults:ku(this.defaults)}static getAttrHooks(){return this.attrHooks}static applyPropHooks(t,e){return this.propHooks.reduce(((e,n)=>n?Em(n,t,e):e),e)}get[Symbol.toStringTag](){return ZS.toStringTag}init(){}get model(){return this._model}set model(t){this._model!==t&&(this._model=t)}preprocess(t,e){const n=t.id,i=this.constructor,s=i.applyPropHooks(this,t);return null==n&&!0!==e&&(s.id=Jf()),s}postprocess(t){}setup(){this.store.on("change:*",(t=>{const{key:e,current:n,previous:i,options:s}=t;this.notify("change:*",{key:e,options:s,current:n,previous:i,cell:this}),this.notify(`change:${e}`,{options:s,current:n,previous:i,cell:this});const r=e;"source"!==r&&"target"!==r||this.notify("change:terminal",{type:r,current:n,previous:i,options:s,cell:this})})),this.store.on("changed",(({options:t})=>this.notify("changed",{options:t,cell:this})))}notify(t,e){this.trigger(t,e);const n=this.model;return n&&(n.notify(`cell:${t}`,e),this.isNode()?n.notify(`node:${t}`,Object.assign(Object.assign({},e),{node:this})):this.isEdge()&&n.notify(`edge:${t}`,Object.assign(Object.assign({},e),{edge:this}))),this}isNode(){return!1}isEdge(){return!1}isSameStore(t){return this.store===t.store}get view(){return this.store.get("view")}get shape(){return this.store.get("shape","")}getProp(t,e){return null==t?this.store.get():this.store.get(t,e)}setProp(t,e,n){if("string"===typeof t)this.store.set(t,e,n);else{const n=this.preprocess(t,!0);this.store.set(kc({},this.getProp(),n),e),this.postprocess(t)}return this}removeProp(t,e){return"string"===typeof t||Array.isArray(t)?this.store.removeByPath(t,e):this.store.remove(e),this}hasChanged(t){return null==t?this.store.hasChanged():this.store.hasChanged(t)}getPropByPath(t){return this.store.getByPath(t)}setPropByPath(t,e,n={}){return this.model&&("children"===t?this._children=e?e.map((t=>this.model.getCell(t))).filter((t=>null!=t)):null:"parent"===t&&(this._parent=e?this.model.getCell(e):null)),this.store.setByPath(t,e,n),this}removePropByPath(t,e={}){const n=Array.isArray(t)?t:t.split("/");return"attrs"===n[0]&&(e.dirty=!0),this.store.removeByPath(n,e),this}prop(t,e,n){return null==t?this.getProp():"string"===typeof t||Array.isArray(t)?1===arguments.length?this.getPropByPath(t):null==e?this.removePropByPath(t,n||{}):this.setPropByPath(t,e,n||{}):this.setProp(t,e||{})}previous(t){return this.store.getPrevious(t)}get zIndex(){return this.getZIndex()}set zIndex(t){null==t?this.removeZIndex():this.setZIndex(t)}getZIndex(){return this.store.get("zIndex")}setZIndex(t,e={}){return this.store.set("zIndex",t,e),this}removeZIndex(t={}){return this.store.remove("zIndex",t),this}toFront(t={}){const e=this.model;if(e){let n,i=e.getMaxZIndex();t.deep?(n=this.getDescendants({deep:!0,breadthFirst:!0}),n.unshift(this)):n=[this],i=i-n.length+1;const s=e.total();let r=e.indexOf(this)!==s-n.length;r||(r=n.some(((t,e)=>t.getZIndex()!==i+e))),r&&this.batchUpdate("to-front",(()=>{i+=n.length,n.forEach(((e,n)=>{e.setZIndex(i+n,t)}))}))}return this}toBack(t={}){const e=this.model;if(e){let n,i=e.getMinZIndex();t.deep?(n=this.getDescendants({deep:!0,breadthFirst:!0}),n.unshift(this)):n=[this];let s=0!==e.indexOf(this);s||(s=n.some(((t,e)=>t.getZIndex()!==i+e))),s&&this.batchUpdate("to-back",(()=>{i-=n.length,n.forEach(((e,n)=>{e.setZIndex(i+n,t)}))}))}return this}get markup(){return this.getMarkup()}set markup(t){null==t?this.removeMarkup():this.setMarkup(t)}getMarkup(){let t=this.store.get("markup");if(null==t){const e=this.constructor;t=e.getMarkup()}return t}setMarkup(t,e={}){return this.store.set("markup",t,e),this}removeMarkup(t={}){return this.store.remove("markup",t),this}get attrs(){return this.getAttrs()}set attrs(t){null==t?this.removeAttrs():this.setAttrs(t)}getAttrs(){const t=this.store.get("attrs");return t?Object.assign({},t):{}}setAttrs(t,e={}){if(null==t)this.removeAttrs(e);else{const n=t=>this.store.set("attrs",t,e);if(!0===e.overwrite)n(t);else{const i=this.getAttrs();!1===e.deep?n(Object.assign(Object.assign({},i),t)):n(kc({},i,t))}}return this}replaceAttrs(t,e={}){return this.setAttrs(t,Object.assign(Object.assign({},e),{overwrite:!0}))}updateAttrs(t,e={}){return this.setAttrs(t,Object.assign(Object.assign({},e),{deep:!1}))}removeAttrs(t={}){return this.store.remove("attrs",t),this}getAttrDefinition(t){if(!t)return null;const e=this.constructor,n=e.getAttrHooks()||{};let i=n[t]||YC.registry.get(t);if(!i){const e=zf(t);i=n[e]||YC.registry.get(e)}return i||null}getAttrByPath(t){return null==t||""===t?this.getAttrs():this.getPropByPath(this.prefixAttrPath(t))}setAttrByPath(t,e,n={}){return this.setPropByPath(this.prefixAttrPath(t),e,n),this}removeAttrByPath(t,e={}){return this.removePropByPath(this.prefixAttrPath(t),e),this}prefixAttrPath(t){return Array.isArray(t)?["attrs"].concat(t):`attrs/${t}`}attr(t,e,n){return null==t?this.getAttrByPath():"string"===typeof t||Array.isArray(t)?1===arguments.length?this.getAttrByPath(t):null==e?this.removeAttrByPath(t,n||{}):this.setAttrByPath(t,e,n||{}):this.setAttrs(t,e||{})}get visible(){return this.isVisible()}set visible(t){this.setVisible(t)}setVisible(t,e={}){return this.store.set("visible",t,e),this}isVisible(){return!1!==this.store.get("visible")}show(t={}){return this.isVisible()||this.setVisible(!0,t),this}hide(t={}){return this.isVisible()&&this.setVisible(!1,t),this}toggleVisible(t,e={}){const n="boolean"===typeof t?t:!this.isVisible(),i="boolean"===typeof t?e:t;return n?this.show(i):this.hide(i),this}get data(){return this.getData()}set data(t){this.setData(t)}getData(){return this.store.get("data")}setData(t,e={}){if(null==t)this.removeData(e);else{const n=t=>this.store.set("data",t,e);if(!0===e.overwrite)n(t);else{const i=this.getData();!1===e.deep?n("object"===typeof t?Object.assign(Object.assign({},i),t):t):n(kc({},i,t))}}return this}replaceData(t,e={}){return this.setData(t,Object.assign(Object.assign({},e),{overwrite:!0}))}updateData(t,e={}){return this.setData(t,Object.assign(Object.assign({},e),{deep:!1}))}removeData(t={}){return this.store.remove("data",t),this}get parent(){return this.getParent()}get children(){return this.getChildren()}getParentId(){return this.store.get("parent")}getParent(){const t=this.getParentId();if(t&&this.model){const e=this.model.getCell(t);return this._parent=e,e}return null}getChildren(){const t=this.store.get("children");if(t&&t.length&&this.model){const e=t.map((t=>{var e;return null===(e=this.model)||void 0===e?void 0:e.getCell(t)})).filter((t=>null!=t));return this._children=e,[...e]}return null}hasParent(){return null!=this.parent}isParentOf(t){return null!=t&&t.getParent()===this}isChildOf(t){return null!=t&&this.getParent()===t}eachChild(t,e){return this.children&&this.children.forEach(t,e),this}filterChild(t,e){return this.children?this.children.filter(t,e):[]}getChildCount(){return null==this.children?0:this.children.length}getChildIndex(t){return null==this.children?-1:this.children.indexOf(t)}getChildAt(t){return null!=this.children&&t>=0?this.children[t]:null}getAncestors(t={}){const e=[];let n=this.getParent();while(n)e.push(n),n=!1!==t.deep?n.getParent():null;return e}getDescendants(t={}){if(!1!==t.deep){if(t.breadthFirst){const t=[],e=this.getChildren()||[];while(e.length>0){const n=e.shift(),i=n.getChildren();t.push(n),i&&e.push(...i)}return t}{const e=this.getChildren()||[];return e.forEach((n=>{e.push(...n.getDescendants(t))})),e}}return this.getChildren()||[]}isDescendantOf(t,e={}){if(null==t)return!1;if(!1!==e.deep){let e=this.getParent();while(e){if(e===t)return!0;e=e.getParent()}return!1}return this.isChildOf(t)}isAncestorOf(t,e={}){return null!=t&&t.isDescendantOf(this,e)}contains(t){return this.isAncestorOf(t)}getCommonAncestor(...t){return ZS.getCommonAncestor(this,...t)}setParent(t,e={}){return this._parent=t,t?this.store.set("parent",t.id,e):this.store.remove("parent",e),this}setChildren(t,e={}){return this._children=t,null!=t?this.store.set("children",t.map((t=>t.id)),e):this.store.remove("children",e),this}unembed(t,e={}){const n=this.children;if(null!=n&&null!=t){const i=this.getChildIndex(t);-1!==i&&(n.splice(i,1),t.setParent(null,e),this.setChildren(n,e))}return this}embed(t,e={}){return t.addTo(this,e),this}addTo(t,e={}){return ZS.isCell(t)?t.addChild(this,e):t.addCell(this,e),this}insertTo(t,e,n={}){return t.insertChild(this,e,n),this}addChild(t,e={}){return this.insertChild(t,void 0,e)}insertChild(t,e,n={}){if(null!=t&&t!==this){const i=t.getParent(),s=this!==i;let r=e;if(null==r&&(r=this.getChildCount(),s||(r-=1)),i){const e=i.getChildren();if(e){const s=e.indexOf(t);s>=0&&(t.setParent(null,n),e.splice(s,1),i.setChildren(e,n))}}let o=this.children;if(null==o?(o=[],o.push(t)):o.splice(r,0,t),t.setParent(this,n),this.setChildren(o,n),s&&this.model){const t=this.model.getIncomingEdges(this),e=this.model.getOutgoingEdges(this);t&&t.forEach((t=>t.updateParent(n))),e&&e.forEach((t=>t.updateParent(n)))}this.model&&this.model.addCell(t,n)}return this}removeFromParent(t={}){const e=this.getParent();if(null!=e){const n=e.getChildIndex(this);e.removeChildAt(n,t)}return this}removeChild(t,e={}){const n=this.getChildIndex(t);return this.removeChildAt(n,e)}removeChildAt(t,e={}){const n=this.getChildAt(t),i=this.children;return null!=i&&null!=n&&(this.unembed(n,e),n.remove(e)),n}remove(t={}){return this.batchUpdate("remove",(()=>{const e=this.getParent();e&&e.removeChild(this,t),!1!==t.deep&&this.eachChild((e=>e.remove(t))),this.model&&this.model.removeCell(this,t)})),this}transition(t,e,n={},i="/"){return this.animation.start(t,e,n,i)}stopTransition(t,e,n="/"){return this.animation.stop(t,e,n),this}getTransitions(){return this.animation.get()}translate(t,e,n){return this}scale(t,e,n,i){return this}addTools(t,e,n){const i=Array.isArray(t)?t:[t],s="string"===typeof e?e:null,r="object"===typeof e?e:"object"===typeof n?n:{};if(r.reset)return this.setTools({name:s,items:i,local:r.local},r);let o=ku(this.getTools());return null==o||null==s||o.name===s?(null==o&&(o={}),o.items||(o.items=[]),o.name=s,o.items=[...o.items,...i],this.setTools(Object.assign({},o),r)):void 0}setTools(t,e={}){return null==t?this.removeTools():this.store.set("tools",ZS.normalizeTools(t),e),this}getTools(){return this.store.get("tools")}removeTools(t={}){return this.store.remove("tools",t),this}hasTools(t){const e=this.getTools();return null!=e&&(null==t||e.name===t)}hasTool(t){const e=this.getTools();return null!=e&&e.items.some((e=>"string"===typeof e?e===t:e.name===t))}removeTool(t,e={}){const n=ku(this.getTools());if(n){let i=!1;const s=n.items.slice(),r=t=>{s.splice(t,1),i=!0};if("number"===typeof t)r(t);else for(let e=s.length-1;e>=0;e-=1){const n=s[e],i="string"===typeof n?n===t:n.name===t;i&&r(e)}i&&(n.items=s,this.setTools(n,e))}return this}getBBox(t){return new Ly}getConnectionPoint(t,e){return new jy}toJSON(t={}){const e=Object.assign({},this.store.get()),n=Object.prototype.toString,i=this.isNode()?"node":this.isEdge()?"edge":"cell";if(!e.shape){const t=this.constructor;throw new Error(`Unable to serialize ${i} missing "shape" prop, check the ${i} "${t.name||n.call(t)}"`)}const s=this.constructor,r=!0===t.diff,o=e.attrs||{},a=s.getDefaults(!0),l=r?this.preprocess(a,!0):a,c=l.attrs||{},h={};Object.keys(e).forEach((t=>{const s=e[t];if(null!=s&&!Array.isArray(s)&&"object"===typeof s&&!pc(s))throw new Error(`Can only serialize ${i} with plain-object props, but got a "${n.call(s)}" type of key "${t}" on ${i} "${this.id}"`);if("attrs"!==t&&"shape"!==t&&r){const n=l[t];Pc(s,n)&&delete e[t]}})),Object.keys(o).forEach((t=>{const e=o[t],n=c[t];Object.keys(e).forEach((i=>{const s=e[i],r=n?n[i]:null;null==s||"object"!==typeof s||Array.isArray(s)?null!=n&&Pc(r,s)||(null==h[t]&&(h[t]={}),h[t][i]=s):Object.keys(s).forEach((e=>{const o=s[e];if(null==n||null==r||!W(r)||!Pc(r[e],o)){null==h[t]&&(h[t]={}),null==h[t][i]&&(h[t][i]={});const n=h[t][i];n[e]=o}}))}))}));const u=Object.assign(Object.assign({},e),{attrs:Fc(h)?void 0:h});null==u.attrs&&delete u.attrs;const d=u;return 0===d.angle&&delete d.angle,ku(d)}clone(t={}){if(!t.deep){const e=Object.assign({},this.store.get());t.keepId||delete e.id,delete e.parent,delete e.children;const n=this.constructor;return new n(e)}const e=ZS.deepClone(this);return e[this.id]}findView(t){return t.renderer.findViewByCell(this)}startBatch(t,e={},n=this.model){return this.notify("batch:start",{name:t,data:e,cell:this}),n&&n.startBatch(t,Object.assign(Object.assign({},e),{cell:this})),this}stopBatch(t,e={},n=this.model){return n&&n.stopBatch(t,Object.assign(Object.assign({},e),{cell:this})),this.notify("batch:stop",{name:t,data:e,cell:this}),this}batchUpdate(t,e,n){const i=this.model;this.startBatch(t,n,i);const s=e();return this.stopBatch(t,n,i),s}dispose(){this.removeFromParent(),this.store.dispose()}}ZS.defaults={},ZS.attrHooks={},ZS.propHooks=[],YS([px.dispose()],ZS.prototype,"dispose",null),function(t){function e(t){return"string"===typeof t?{items:[t]}:Array.isArray(t)?{items:t}:t.items?t:{items:[t]}}t.normalizeTools=e}(ZS||(ZS={})),function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return(null==n||n===t.toStringTag)&&"function"===typeof i.isNode&&"function"===typeof i.isEdge&&"function"===typeof i.prop&&"function"===typeof i.attr}t.toStringTag=`X6.${t.name}`,t.isCell=e}(ZS||(ZS={})),function(t){function e(...t){const e=t.filter((t=>null!=t)).map((t=>t.getAncestors())).sort(((t,e)=>t.length-e.length)),n=e.shift();return n.find((t=>e.every((e=>e.includes(t)))))||null}function n(t,e={}){let n=null;for(let i=0,s=t.length;i(t[e.id]=e.clone(),t)),{});return e.forEach((t=>{const e=n[t.id];if(e.isEdge()){const t=e.getSourceCellId(),i=e.getTargetCellId();t&&n[t]&&e.setSource(Object.assign(Object.assign({},e.getSource()),{cell:n[t].id})),i&&n[i]&&e.setTarget(Object.assign(Object.assign({},e.getTarget()),{cell:n[i].id}))}const i=t.getParent();i&&n[i.id]&&e.setParent(n[i.id]);const s=t.getChildren();if(s&&s.length){const t=s.reduce(((t,e)=>(n[e.id]&&t.push(n[e.id]),t)),[]);t.length>0&&e.setChildren(t)}})),n}t.getCommonAncestor=e,t.getCellsBBox=n,t.deepClone=i,t.cloneCells=s}(ZS||(ZS={})),function(t){t.config({propHooks(e){var{tools:n}=e,i=JS(e,["tools"]);return n&&(i.tools=t.normalizeTools(n)),i}})}(ZS||(ZS={})),function(t){let e,n;function i(t,i){return i?null!=e&&e.exist(t):null!=n&&n.exist(t)}function s(t){e=t}function r(t){n=t}t.exist=i,t.setEdgeRegistry=s,t.setNodeRegistry=r}(XS||(XS={}));class KS{constructor(t){this.ports=[],this.groups={},this.init(ku(t))}getPorts(){return this.ports}getGroup(t){return null!=t?this.groups[t]:null}getPortsByGroup(t){return this.ports.filter((e=>e.group===t||null==e.group&&null==t))}getPortsLayoutByGroup(t,e){const n=this.getPortsByGroup(t),i=t?this.getGroup(t):null,s=i?i.position:null,r=s?s.name:null;let o;if(null!=r){const t=Gw.registry.get(r);if(null==t)return Gw.registry.onNotFound(r);o=t}else o=Gw.presets.left;const a=n.map((t=>t&&t.position&&t.position.args||{})),l=s&&s.args||{},c=o(a,e,l);return c.map(((t,i)=>{const s=n[i];return{portLayout:t,portId:s.id,portSize:s.size,portAttrs:s.attrs,labelSize:s.label.size,labelLayout:this.getPortLabelLayout(s,jy.create(t.position),e)}}))}init(t){const{groups:e,items:n}=t;null!=e&&Object.keys(e).forEach((t=>{this.groups[t]=this.parseGroup(e[t])})),Array.isArray(n)&&n.forEach((t=>{this.ports.push(this.parsePort(t))}))}parseGroup(t){return Object.assign(Object.assign({},t),{label:this.getLabel(t,!0),position:this.getPortPosition(t.position,!0)})}parsePort(t){const e=Object.assign({},t),n=this.getGroup(t.group)||{};return e.markup=e.markup||n.markup,e.attrs=kc({},n.attrs,e.attrs),e.position=this.createPosition(n,e),e.label=kc({},n.label,this.getLabel(e)),e.zIndex=this.getZIndex(n,e),e.size=Object.assign(Object.assign({},n.size),e.size),e}getZIndex(t,e){return"number"===typeof e.zIndex?e.zIndex:"number"===typeof t.zIndex||"auto"===t.zIndex?t.zIndex:"auto"}createPosition(t,e){return kc({name:"left",args:{}},t.position,{args:e.args})}getPortPosition(t,e=!1){if(null==t){if(e)return{name:"left",args:{}}}else{if("string"===typeof t)return{name:t,args:{}};if(Array.isArray(t))return{name:"absolute",args:{x:t[0],y:t[1]}};if("object"===typeof t)return t}return{args:{}}}getPortLabelPosition(t,e=!1){if(null==t){if(e)return{name:"left",args:{}}}else{if("string"===typeof t)return{name:t,args:{}};if("object"===typeof t)return t}return{args:{}}}getLabel(t,e=!1){const n=t.label||{};return n.position=this.getPortLabelPosition(n.position,e),n}getPortLabelLayout(t,e,n){const i=t.label.position.name||"left",s=t.label.position.args||{},r=ax.registry.get(i)||ax.presets.left;return r?r(e,n,s):null}}var QS=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{var s;const r=null===(s=n.exclude)||void 0===s?void 0:s.includes(i);r||i.translate(t,e,n)}))):(this.startBatch("translate",n),this.store.set("position",s,n),this.eachChild((i=>{var s;const r=null===(s=n.exclude)||void 0===s?void 0:s.includes(i);r||i.translate(t,e,n)})),this.stopBatch("translate",n)),this}angle(t,e){return null==t?this.getAngle():this.rotate(t,e)}getAngle(){return this.store.get("angle",0)}rotate(t,e={}){const n=this.getAngle();if(e.center){const i=this.getSize(),s=this.getPosition(),r=this.getBBox().getCenter();r.rotate(n-t,e.center);const o=r.x-i.width/2-s.x,a=r.y-i.height/2-s.y;this.startBatch("rotate",{angle:t,options:e}),this.setPosition(s.x+o,s.y+a,e),this.rotate(t,Object.assign(Object.assign({},e),{center:null})),this.stopBatch("rotate")}else this.store.set("angle",e.absolute?t:(n+t)%360,e);return this}getBBox(t={}){if(t.deep){const t=this.getDescendants({deep:!0,breadthFirst:!0});return t.push(this),ZS.getCellsBBox(t)}return Ly.fromPositionAndSize(this.getPosition(),this.getSize())}getConnectionPoint(t,e){const n=this.getBBox(),i=n.getCenter(),s=t.getTerminal(e);if(null==s)return i;const r=s.port;if(!r||!this.hasPort(r))return i;const o=this.getPort(r);if(!o||!o.group)return i;const a=this.getPortsPosition(o.group),l=a[r].position,c=jy.create(l).translate(n.getOrigin()),h=this.getAngle();return h&&c.rotate(-h,i),c}fit(t={}){const e=this.getChildren()||[],n=e.filter((t=>t.isNode()));if(0===n.length)return this;this.startBatch("fit-embeds",t),t.deep&&n.forEach((e=>e.fit(t)));let{x:i,y:s,width:r,height:o}=ZS.getCellsBBox(n);const a=cm(t.padding);return i-=a.left,s-=a.top,r+=a.left+a.right,o+=a.bottom+a.top,this.store.set({position:{x:i,y:s},size:{width:r,height:o}},t),this.stopBatch("fit-embeds"),this}get portContainerMarkup(){return this.getPortContainerMarkup()}set portContainerMarkup(t){this.setPortContainerMarkup(t)}getDefaultPortContainerMarkup(){return this.store.get("defaultPortContainerMarkup")||Nx.getPortContainerMarkup()}getPortContainerMarkup(){return this.store.get("portContainerMarkup")||this.getDefaultPortContainerMarkup()}setPortContainerMarkup(t,e={}){return this.store.set("portContainerMarkup",Nx.clone(t),e),this}get portMarkup(){return this.getPortMarkup()}set portMarkup(t){this.setPortMarkup(t)}getDefaultPortMarkup(){return this.store.get("defaultPortMarkup")||Nx.getPortMarkup()}getPortMarkup(){return this.store.get("portMarkup")||this.getDefaultPortMarkup()}setPortMarkup(t,e={}){return this.store.set("portMarkup",Nx.clone(t),e),this}get portLabelMarkup(){return this.getPortLabelMarkup()}set portLabelMarkup(t){this.setPortLabelMarkup(t)}getDefaultPortLabelMarkup(){return this.store.get("defaultPortLabelMarkup")||Nx.getPortLabelMarkup()}getPortLabelMarkup(){return this.store.get("portLabelMarkup")||this.getDefaultPortLabelMarkup()}setPortLabelMarkup(t,e={}){return this.store.set("portLabelMarkup",Nx.clone(t),e),this}get ports(){const t=this.store.get("ports",{items:[]});return null==t.items&&(t.items=[]),t}getPorts(){return ku(this.ports.items)}getPortsByGroup(t){return this.getPorts().filter((e=>e.group===t))}getPort(t){return ku(this.ports.items.find((e=>e.id&&e.id===t)))}getPortAt(t){return this.ports.items[t]||null}hasPorts(){return this.ports.items.length>0}hasPort(t){return-1!==this.getPortIndex(t)}getPortIndex(t){const e="string"===typeof t?t:t.id;return null!=e?this.ports.items.findIndex((t=>t.id===e)):-1}getPortsPosition(t){const e=this.getSize(),n=this.port.getPortsLayoutByGroup(t,new Ly(0,0,e.width,e.height));return n.reduce(((t,e)=>{const n=e.portLayout;return t[e.portId]={position:Object.assign({},n.position),angle:n.angle||0},t}),{})}getPortProp(t,e){return this.getPropByPath(this.prefixPortPath(t,e))}setPortProp(t,e,n,i){if("string"===typeof e||Array.isArray(e)){const s=this.prefixPortPath(t,e),r=n;return this.setPropByPath(s,r,i)}const s=this.prefixPortPath(t),r=e;return this.setPropByPath(s,r,n)}removePortProp(t,e,n){return"string"===typeof e||Array.isArray(e)?this.removePropByPath(this.prefixPortPath(t,e),n):this.removePropByPath(this.prefixPortPath(t),e)}portProp(t,e,n,i){return null==e?this.getPortProp(t):"string"===typeof e||Array.isArray(e)?2===arguments.length?this.getPortProp(t,e):null==n?this.removePortProp(t,e,i):this.setPortProp(t,e,n,i):this.setPortProp(t,e,n)}prefixPortPath(t,e){const n=this.getPortIndex(t);if(-1===n)throw new Error(`Unable to find port with id: "${t}"`);return null==e||""===e?["ports","items",`${n}`]:Array.isArray(e)?["ports","items",`${n}`,...e]:`ports/items/${n}/${e}`}addPort(t,e){const n=[...this.ports.items];return n.push(t),this.setPropByPath("ports/items",n,e),this}addPorts(t,e){return this.setPropByPath("ports/items",[...this.ports.items,...t],e),this}insertPort(t,e,n){const i=[...this.ports.items];return i.splice(t,0,e),this.setPropByPath("ports/items",i,n),this}removePort(t,e={}){return this.removePortAt(this.getPortIndex(t),e)}removePortAt(t,e={}){if(t>=0){const n=[...this.ports.items];n.splice(t,1),e.rewrite=!0,this.setPropByPath("ports/items",n,e)}return this}removePorts(t,e){let n;if(Array.isArray(t)){if(n=e||{},t.length){n.rewrite=!0;const e=[...this.ports.items],i=e.filter((e=>!t.some((t=>{const n="string"===typeof t?t:t.id;return e.id===n}))));this.setPropByPath("ports/items",i,n)}}else n=t||{},n.rewrite=!0,this.setPropByPath("ports/items",[],n);return this}getParsedPorts(){return this.port.getPorts()}getParsedGroups(){return this.port.groups}getPortsLayoutByGroup(t,e){return this.port.getPortsLayoutByGroup(t,e)}initPorts(){this.updatePortData(),this.on("change:ports",(()=>{this.processRemovedPort(),this.updatePortData()}))}processRemovedPort(){const t=this.ports,e={};t.items.forEach((t=>{t.id&&(e[t.id]=!0)}));const n={},i=this.store.getPrevious("ports")||{items:[]};i.items.forEach((t=>{t.id&&!e[t.id]&&(n[t.id]=!0)}));const s=this.model;if(s&&!Fc(n)){const t=s.getConnectedEdges(this,{incoming:!0});t.forEach((t=>{const e=t.getTargetPortId();e&&n[e]&&t.remove()}));const e=s.getConnectedEdges(this,{outgoing:!0});e.forEach((t=>{const e=t.getSourcePortId();e&&n[e]&&t.remove()}))}}validatePorts(){const t={},e=[];return this.ports.items.forEach((n=>{"object"!==typeof n&&e.push(`Invalid port ${n}.`),null==n.id&&(n.id=this.generatePortId()),t[n.id]&&e.push("Duplicitied port id."),t[n.id]=!0})),e}generatePortId(){return Jf()}updatePortData(){const t=this.validatePorts();if(t.length>0)throw this.store.set("ports",this.store.getPrevious("ports")),new Error(t.join(" "));const e=this.port?this.port.getPorts():null;this.port=new KS(this.ports);const n=this.port.getPorts(),i=e?n.filter((t=>e.find((e=>e.id===t.id))?null:t)):[...n],s=e?e.filter((t=>n.find((e=>e.id===t.id))?null:t)):[];i.length>0&&this.notify("ports:added",{added:i,cell:this,node:this}),s.length>0&&this.notify("ports:removed",{removed:s,cell:this,node:this})}}tA.defaults={angle:0,position:{x:0,y:0},size:{width:1,height:1}},function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return(null==n||n===t.toStringTag)&&"function"===typeof i.isNode&&"function"===typeof i.isEdge&&"function"===typeof i.prop&&"function"===typeof i.attr&&"function"===typeof i.size&&"function"===typeof i.position}t.toStringTag=`X6.${t.name}`,t.isNode=e}(tA||(tA={})),function(t){t.config({propHooks(t){var{ports:e}=t,n=QS(t,["ports"]);return e&&(n.ports=Array.isArray(e)?{items:e}:e),n}})}(tA||(tA={})),function(t){t.registry=yv.create({type:"node",process(e,n){if(XS.exist(e,!0))throw new Error(`Node with name '${e}' was registered by anthor Edge`);if("function"===typeof n)return n.config({shape:e}),n;let i=t;const{inherit:s}=n,r=QS(n,["inherit"]);if(s)if("string"===typeof s){const t=this.get(s);null==t?this.onNotFound(s,"inherited"):i=t}else i=s;null==r.constructorName&&(r.constructorName=e);const o=i.define.call(i,r);return o.config({shape:e}),o}}),XS.setNodeRegistry(t.registry)}(tA||(tA={})),function(t){let e=0;function n(t){return t?Xf(t):(e+=1,`CustomNode${e}`)}function i(e){const{constructorName:i,overwrite:s}=e,r=QS(e,["constructorName","overwrite"]),o=Gu(n(i||r.shape),this);return o.config(r),r.shape&&t.registry.register(r.shape,o,s),o}function s(e){const n=e.shape||"rect",i=t.registry.get(n);return i?new i(e):t.registry.onNotFound(n)}t.define=i,t.create=s}(tA||(tA={}));var eA=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<${t}/>${e?"":""}`}function rA(t){return`basic.${t}`}function oA(t="xlink:href"){const e=e=>{const{imageUrl:n,imageWidth:i,imageHeight:s}=e,r=iA(e,["imageUrl","imageWidth","imageHeight"]);if(null!=n||null!=i||null!=s){const e=()=>{if(r.attrs){const e=r.attrs.image;null!=n&&(e[t]=n),null!=i&&(e.width=i),null!=s&&(e.height=s),r.attrs.image=e}};r.attrs?(null==r.attrs.image&&(r.attrs.image={}),e()):(r.attrs={image:{}},e())}return r};return e}function aA(t,e,n={}){const i=rA(t),s={constructorName:i,attrs:{".":{fill:"#ffffff",stroke:"none"},[t]:{fill:"#ffffff",stroke:"#000000"}}};n.ignoreMarkup||(s.markup=sA(t,!0===n.noText));const r=n.parent||nA;return r.define(kc(s,e,{shape:i}))}aA("rect",{attrs:{rect:{width:100,height:60}}}),aA("circle",{width:60,height:60,attrs:{circle:{r:30,cx:30,cy:30}}}),aA("ellipse",{width:60,height:40,attrs:{ellipse:{rx:30,ry:20,cx:30,cy:20}}}),aA("polygon",{width:60,height:40,attrs:{text:{refY:null,refDy:16}}}),aA("polyline",{width:60,height:40,attrs:{text:{refY:null,refDy:16}}}),aA("image",{attrs:{text:{refY:null,refDy:16}},propHooks:oA()});var lA=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s"string"===typeof t||"number"===typeof t;if(null!=n)if(ZS.isCell(n))u.source={cell:n.id};else if(d(n))u.source={cell:n};else if(jy.isPoint(n))u.source=n.toJSON();else if(Array.isArray(n))u.source={x:n[0],y:n[1]};else{const t=n.cell;ZS.isCell(t)?u.source=Object.assign(Object.assign({},n),{cell:t.id}):u.source=n}if(null!=i||null!=s){let t=u.source;if(null!=i){const e=d(i)?i:i.id;t?t.cell=e:t=u.source={cell:e}}null!=s&&t&&(t.port=s)}else null!=r&&(u.source=jy.create(r).toJSON());if(null!=o)if(ZS.isCell(o))u.target={cell:o.id};else if(d(o))u.target={cell:o};else if(jy.isPoint(o))u.target=o.toJSON();else if(Array.isArray(o))u.target={x:o[0],y:o[1]};else{const t=o.cell;ZS.isCell(t)?u.target=Object.assign(Object.assign({},o),{cell:t.id}):u.target=o}if(null!=a||null!=l){let t=u.target;if(null!=a){const e=d(a)?a:a.id;t?t.cell=e:t=u.target={cell:e}}null!=l&&t&&(t.port=l)}else null!=c&&(u.target=jy.create(c).toJSON());return super.preprocess(u,e)}setup(){super.setup(),this.on("change:labels",(t=>this.onLabelsChanged(t))),this.on("change:vertices",(t=>this.onVertexsChanged(t)))}isEdge(){return!0}disconnect(t={}){return this.store.set({source:{x:0,y:0},target:{x:0,y:0}},t),this}get source(){return this.getSource()}set source(t){this.setSource(t)}getSource(){return this.getTerminal("source")}getSourceCellId(){return this.source.cell}getSourcePortId(){return this.source.port}setSource(t,e,n={}){return this.setTerminal("source",t,e,n)}get target(){return this.getTarget()}set target(t){this.setTarget(t)}getTarget(){return this.getTerminal("target")}getTargetCellId(){return this.target.cell}getTargetPortId(){return this.target.port}setTarget(t,e,n={}){return this.setTerminal("target",t,e,n)}getTerminal(t){return Object.assign({},this.store.get(t))}setTerminal(t,e,n,i={}){if(ZS.isCell(e))return this.store.set(t,kc({},n,{cell:e.id}),i),this;const s=e;return jy.isPoint(e)||null!=s.x&&null!=s.y?(this.store.set(t,kc({},n,{x:s.x,y:s.y}),i),this):(this.store.set(t,ku(e),i),this)}getSourcePoint(){return this.getTerminalPoint("source")}getTargetPoint(){return this.getTerminalPoint("target")}getTerminalPoint(t){const e=this[t];if(jy.isPointLike(e))return jy.create(e);const n=this.getTerminalCell(t);return n?n.getConnectionPoint(this,t):new jy}getSourceCell(){return this.getTerminalCell("source")}getTargetCell(){return this.getTerminalCell("target")}getTerminalCell(t){if(this.model){const e="source"===t?this.getSourceCellId():this.getTargetCellId();if(e)return this.model.getCell(e)}return null}getSourceNode(){return this.getTerminalNode("source")}getTargetNode(){return this.getTerminalNode("target")}getTerminalNode(t){let e=this;const n={};while(e&&e.isEdge()){if(n[e.id])return null;n[e.id]=!0,e=e.getTerminalCell(t)}return e&&e.isNode()?e:null}get router(){return this.getRouter()}set router(t){null==t?this.removeRouter():this.setRouter(t)}getRouter(){return this.store.get("router")}setRouter(t,e,n){return"object"===typeof t?this.store.set("router",t,e):this.store.set("router",{name:t,args:e},n),this}removeRouter(t={}){return this.store.remove("router",t),this}get connector(){return this.getConnector()}set connector(t){null==t?this.removeConnector():this.setConnector(t)}getConnector(){return this.store.get("connector")}setConnector(t,e,n){return"object"===typeof t?this.store.set("connector",t,e):this.store.set("connector",{name:t,args:e},n),this}removeConnector(t={}){return this.store.remove("connector",t)}get strategy(){return this.getStrategy()}set strategy(t){null==t?this.removeStrategy():this.setStrategy(t)}getStrategy(){return this.store.get("strategy")}setStrategy(t,e,n){return"object"===typeof t?this.store.set("strategy",t,e):this.store.set("strategy",{name:t,args:e},n),this}removeStrategy(t={}){return this.store.remove("strategy",t)}getDefaultLabel(){const t=this.constructor,e=this.store.get("defaultLabel")||t.defaultLabel||{};return ku(e)}get labels(){return this.getLabels()}set labels(t){this.setLabels(t)}getLabels(){return[...this.store.get("labels",[])].map((t=>this.parseLabel(t)))}setLabels(t,e={}){return this.store.set("labels",Array.isArray(t)?t:[t],e),this}insertLabel(t,e,n={}){const i=this.getLabels(),s=i.length;let r=null!=e&&Number.isFinite(e)?e:s;return r<0&&(r=s+r+1),i.splice(r,0,this.parseLabel(t)),this.setLabels(i,n)}appendLabel(t,e={}){return this.insertLabel(t,-1,e)}getLabelAt(t){const e=this.getLabels();return null!=t&&Number.isFinite(t)?this.parseLabel(e[t]):null}setLabelAt(t,e,n={}){if(null!=t&&Number.isFinite(t)){const i=this.getLabels();i[t]=this.parseLabel(e),this.setLabels(i,n)}return this}removeLabelAt(t,e={}){const n=this.getLabels(),i=null!=t&&Number.isFinite(t)?t:-1,s=n.splice(i,1);return this.setLabels(n,e),s.length?s[0]:null}parseLabel(t){if("string"===typeof t){const e=this.constructor;return e.parseStringLabel(t)}return t}onLabelsChanged({previous:t,current:e}){const n=t&&e?e.filter((e=>t.find((t=>e===t||Pc(e,t)))?null:e)):e?[...e]:[],i=t&&e?t.filter((t=>e.find((e=>t===e||Pc(t,e)))?null:t)):t?[...t]:[];n.length>0&&this.notify("labels:added",{added:n,cell:this,edge:this}),i.length>0&&this.notify("labels:removed",{removed:i,cell:this,edge:this})}get vertexMarkup(){return this.getVertexMarkup()}set vertexMarkup(t){this.setVertexMarkup(t)}getDefaultVertexMarkup(){return this.store.get("defaultVertexMarkup")||Nx.getEdgeVertexMarkup()}getVertexMarkup(){return this.store.get("vertexMarkup")||this.getDefaultVertexMarkup()}setVertexMarkup(t,e={}){return this.store.set("vertexMarkup",Nx.clone(t),e),this}get vertices(){return this.getVertices()}set vertices(t){this.setVertices(t)}getVertices(){return[...this.store.get("vertices",[])]}setVertices(t,e={}){const n=Array.isArray(t)?t:[t];return this.store.set("vertices",n.map((t=>jy.toJSON(t))),e),this}insertVertex(t,e,n={}){const i=this.getVertices(),s=i.length;let r=null!=e&&Number.isFinite(e)?e:s;return r<0&&(r=s+r+1),i.splice(r,0,jy.toJSON(t)),this.setVertices(i,n)}appendVertex(t,e={}){return this.insertVertex(t,-1,e)}getVertexAt(t){if(null!=t&&Number.isFinite(t)){const e=this.getVertices();return e[t]}return null}setVertexAt(t,e,n={}){if(null!=t&&Number.isFinite(t)){const i=this.getVertices();i[t]=e,this.setVertices(i,n)}return this}removeVertexAt(t,e={}){const n=this.getVertices(),i=null!=t&&Number.isFinite(t)?t:-1;return n.splice(i,1),this.setVertices(n,e)}onVertexsChanged({previous:t,current:e}){const n=t&&e?e.filter((e=>t.find((t=>jy.equals(e,t)))?null:e)):e?[...e]:[],i=t&&e?t.filter((t=>e.find((e=>jy.equals(t,e)))?null:t)):t?[...t]:[];n.length>0&&this.notify("vertexs:added",{added:n,cell:this,edge:this}),i.length>0&&this.notify("vertexs:removed",{removed:i,cell:this,edge:this})}getDefaultMarkup(){return this.store.get("defaultMarkup")||Nx.getEdgeMarkup()}getMarkup(){return super.getMarkup()||this.getDefaultMarkup()}get toolMarkup(){return this.getToolMarkup()}set toolMarkup(t){this.setToolMarkup(t)}getDefaultToolMarkup(){return this.store.get("defaultToolMarkup")||Nx.getEdgeToolMarkup()}getToolMarkup(){return this.store.get("toolMarkup")||this.getDefaultToolMarkup()}setToolMarkup(t,e={}){return this.store.set("toolMarkup",t,e),this}get doubleToolMarkup(){return this.getDoubleToolMarkup()}set doubleToolMarkup(t){this.setDoubleToolMarkup(t)}getDefaultDoubleToolMarkup(){return this.store.get("defaultDoubleToolMarkup")}getDoubleToolMarkup(){return this.store.get("doubleToolMarkup")||this.getDefaultDoubleToolMarkup()}setDoubleToolMarkup(t,e={}){return this.store.set("doubleToolMarkup",t,e),this}get arrowheadMarkup(){return this.getArrowheadMarkup()}set arrowheadMarkup(t){this.setArrowheadMarkup(t)}getDefaultArrowheadMarkup(){return this.store.get("defaultArrowheadMarkup")||Nx.getEdgeArrowheadMarkup()}getArrowheadMarkup(){return this.store.get("arrowheadMarkup")||this.getDefaultArrowheadMarkup()}setArrowheadMarkup(t,e={}){return this.store.set("arrowheadMarkup",t,e),this}translate(t,e,n={}){return n.translateBy=n.translateBy||this.id,n.tx=t,n.ty=e,this.applyToPoints((n=>({x:(n.x||0)+t,y:(n.y||0)+e})),n)}scale(t,e,n,i={}){return this.applyToPoints((i=>jy.create(i).scale(t,e,n).toJSON()),i)}applyToPoints(t,e={}){const n={},i=this.getSource(),s=this.getTarget();jy.isPointLike(i)&&(n.source=t(i)),jy.isPointLike(s)&&(n.target=t(s));const r=this.getVertices();return r.length>0&&(n.vertices=r.map(t)),this.store.set(n,e),this}getBBox(){return this.getPolyline().bbox()}getConnectionPoint(){return this.getPolyline().pointAt(.5)}getPolyline(){const t=[this.getSourcePoint(),...this.getVertices().map((t=>jy.create(t))),this.getTargetPoint()];return new Ry(t)}updateParent(t){let e=null;const n=this.getSourceCell(),i=this.getTargetCell(),s=this.getParent();return n&&i&&(e=n===i||n.isDescendantOf(i)?i:i.isDescendantOf(n)?n:ZS.getCommonAncestor(n,i)),!s||e&&e.id===s.id||s.unembed(this,t),e&&e.embed(this,t),e}hasLoop(t={}){const e=this.getSource(),n=this.getTarget(),i=e.cell,s=n.cell;if(!i||!s)return!1;let r=i===s;if(!r&&t.deep&&this._model){const e=this.getSourceCell(),n=this.getTargetCell();e&&n&&(r=e.isAncestorOf(n,t)||n.isAncestorOf(e,t))}return r}getFragmentAncestor(){const t=[this,this.getSourceNode(),this.getTargetNode()].filter((t=>null!=t));return this.getCommonAncestor(...t)}isFragmentDescendantOf(t){const e=this.getFragmentAncestor();return!!e&&(e.id===t.id||e.isDescendantOf(t))}}uA.defaults={},function(t){function e(t,e){const n=t,i=e;return n.cell===i.cell&&(n.port===i.port||null==n.port&&null==i.port)}t.equalTerminals=e}(uA||(uA={})),function(t){function e(t){return{attrs:{label:{text:t}}}}t.defaultLabel={markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"}],attrs:{text:{fill:"#000",fontSize:14,textAnchor:"middle",textVerticalAnchor:"middle",pointerEvents:"none"},rect:{ref:"label",fill:"#fff",rx:3,ry:3,refWidth:1,refHeight:1,refX:0,refY:0}},position:{distance:.5}},t.parseStringLabel=e}(uA||(uA={})),function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return(null==n||n===t.toStringTag)&&"function"===typeof i.isNode&&"function"===typeof i.isEdge&&"function"===typeof i.prop&&"function"===typeof i.attr&&"function"===typeof i.disconnect&&"function"===typeof i.getSource&&"function"===typeof i.getTarget}t.toStringTag=`X6.${t.name}`,t.isEdge=e}(uA||(uA={})),function(t){t.registry=yv.create({type:"edge",process(e,n){if(XS.exist(e,!1))throw new Error(`Edge with name '${e}' was registered by anthor Node`);if("function"===typeof n)return n.config({shape:e}),n;let i=t;const{inherit:s="edge"}=n,r=hA(n,["inherit"]);if("string"===typeof s){const t=this.get(s||"edge");null==t&&s?this.onNotFound(s,"inherited"):i=t}else i=s;null==r.constructorName&&(r.constructorName=e);const o=i.define.call(i,r);return o.config({shape:e}),o}}),XS.setEdgeRegistry(t.registry)}(uA||(uA={})),function(t){let e=0;function n(t){return t?Xf(t):(e+=1,`CustomEdge${e}`)}function i(e){const{constructorName:i,overwrite:s}=e,r=hA(e,["constructorName","overwrite"]),o=Gu(n(i||r.shape),this);return o.config(r),r.shape&&t.registry.register(r.shape,o,s),o}function s(e){const n=e.shape||"edge",i=t.registry.get(n);return i?new i(e):t.registry.onNotFound(n)}t.define=i,t.create=s}(uA||(uA={})),function(t){const e="basic.edge";t.config({shape:e,propHooks(e){const{label:n,vertices:i}=e,s=hA(e,["label","vertices"]);if(n){null==s.labels&&(s.labels=[]);const e="string"===typeof n?t.parseStringLabel(n):n;s.labels.push(e)}return i&&Array.isArray(i)&&(s.vertices=i.map((t=>jy.create(t).toJSON()))),s}}),t.registry.register(e,t)}(uA||(uA={}));var dA=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);sthis.renderVertexMarkers())),n=this.handleAction(n,"update",(()=>this.update(null,e))),n=this.handleAction(n,"labels",(()=>this.onLabelsChange(e))),n=this.handleAction(n,"tools",(()=>{this.renderTools(),this.updateToolsPosition()})),n=this.handleAction(n,"widget",(()=>this.renderExternalTools())),n)}onLabelsChange(t={}){this.shouldRerenderLabels(t)?this.renderLabels():this.updateLabels(),this.updateLabelPositions()}shouldRerenderLabels(t={}){const e=this.cell.previous("labels");if(null==e)return!0;if("propertyPathArray"in t&&"propertyValue"in t){const n=t.propertyPathArray||[],i=n.length;if(i>1){const s=n[1];if(e[s]){if(2===i)return"object"===typeof t.propertyValue&&pl(t.propertyValue,"markup");if("markup"!==n[2])return!1}}}return!0}render(){return this.empty(),this.containers={},this.renderMarkup(),this.renderLabels(),this.update(),this}renderMarkup(){const t=this.cell.markup;if(t)return"string"===typeof t?this.renderStringMarkup(t):this.renderJSONMarkup(t);throw new TypeError("Invalid edge markup.")}renderJSONMarkup(t){const e=this.parseJSONMarkup(t,this.container);this.selectors=e.selectors,this.container.append(e.fragment)}renderStringMarkup(t){const e=this.containers,n=rb.createVectors(t);n.forEach((t=>{const n=t.attr("class");n&&(e[zf(n)]=t.node)})),this.renderTools(),this.renderVertexMarkers(),this.renderArrowheadMarkers(),ey(this.container,n.map((t=>t.node)))}renderLabels(){const t=this.cell,e=t.getLabels(),n=e.length;let i=this.containers.labels;if(this.labelCache={},this.labelSelectors={},n<=0)return i&&i.parentNode&&i.parentNode.removeChild(i),this;i?this.empty(i):(i=Hm("g"),this.addClass(this.prefixClassName("edge-labels"),i),this.containers.labels=i);for(let s=0,r=e.length;s1||"G"!==i[0].nodeName.toUpperCase()?rb.create("g").append(e):rb.create(i[0]),n.addClass(this.prefixClassName("edge-label")),{node:n.node,selectors:t.selectors}}updateLabels(){if(this.containers.labels){const t=this.cell,e=t.labels,n=this.can("edgeLabelMovable"),i=t.getDefaultLabel();for(let s=0,r=e.length;s{n.append(rb.create(t(Object.assign({index:i},e))).node)}))}return this}renderArrowheadMarkers(){const t=this.containers.arrowheads;if(null==t)return this;const e=this.cell.arrowheadMarkup,n=this.$(t).empty();if(Nx.isStringMarkup(e)){const t=ug(e),i=rb.create(t({end:"source"})).node,s=rb.create(t({end:"target"})).node;this.containers.sourceArrowhead=i,this.containers.targetArrowhead=s,n.append(i,s)}return this}update(t,e={}){this.cleanCache(),this.updateConnection(e);const n=this.cell.getAttrs();return null!=n&&this.updateAttrs(this.container,n,{attrs:t===n?null:t,selectors:this.selectors}),this.updateConnectionPath(),this.updateLabelPositions(),this.updateToolsPosition(),this.updateArrowheadMarkers(),null==e.toolId?this.renderExternalTools():this.updateTools(e),this}removeRedundantLinearVertices(t={}){const e=this.cell,n=e.getVertices(),i=[this.sourceAnchor,...n,this.targetAnchor],s=i.length,r=new Ry(i);r.simplify({threshold:.01});const o=r.points.map((t=>t.toJSON())),a=o.length;return s===a?0:(e.setVertices(o.slice(1,a-1),t),s-a)}updateConnectionPath(){const t=this.containers;if(t.connection){const e=this.getConnectionPathData();t.connection.setAttribute("d",e)}if(t.connectionWrap){const e=this.getConnectionPathData();t.connectionWrap.setAttribute("d",e)}t.sourceMarker&&t.targetMarker&&this.translateAndAutoOrientArrows(t.sourceMarker,t.targetMarker)}getTerminalView(t){switch(t){case"source":return this.sourceView||null;case"target":return this.targetView||null;default:throw new Error(`Unknown terminal type '${t}'`)}}getTerminalAnchor(t){switch(t){case"source":return jy.create(this.sourceAnchor);case"target":return jy.create(this.targetAnchor);default:throw new Error(`Unknown terminal type '${t}'`)}}getTerminalConnectionPoint(t){switch(t){case"source":return jy.create(this.sourcePoint);case"target":return jy.create(this.targetPoint);default:throw new Error(`Unknown terminal type '${t}'`)}}getTerminalMagnet(t,e={}){switch(t){case"source":{if(e.raw)return this.sourceMagnet;const t=this.sourceView;return t?this.sourceMagnet||t.container:null}case"target":{if(e.raw)return this.targetMagnet;const t=this.targetView;return t?this.targetMagnet||t.container:null}default:throw new Error(`Unknown terminal type '${t}'`)}}updateConnection(t={}){const e=this.cell;if(t.translateBy&&e.isFragmentDescendantOf(t.translateBy)){const e=t.tx||0,n=t.ty||0;this.routePoints=new Ry(this.routePoints).translate(e,n).points,this.translateConnectionPoints(e,n),this.path.translate(e,n)}else{const t=e.getVertices(),n=this.findAnchors(t);this.sourceAnchor=n.source,this.targetAnchor=n.target,this.routePoints=this.findRoutePoints(t);const i=this.findConnectionPoints(this.routePoints,this.sourceAnchor,this.targetAnchor);this.sourcePoint=i.source,this.targetPoint=i.target;const s=this.findMarkerPoints(this.routePoints,this.sourcePoint,this.targetPoint);this.path=this.findPath(this.routePoints,s.source||this.sourcePoint,s.target||this.targetPoint)}this.cleanCache()}findAnchors(t){const e=this.cell,n=e.source,i=e.target,s=t[0],r=t[t.length-1];return i.priority&&!n.priority?this.findAnchorsOrdered("target",r,"source",s):this.findAnchorsOrdered("source",s,"target",r)}findAnchorsOrdered(t,e,n,i){let s,r;const o=this.cell,a=o[t],l=o[n],c=this.getTerminalView(t),h=this.getTerminalView(n),u=this.getTerminalMagnet(t),d=this.getTerminalMagnet(n);if(c){let n;n=e?jy.create(e):h?d:jy.create(l),s=this.getAnchor(a.anchor,c,u,n,t)}else s=jy.create(a);if(h){const t=jy.create(i||s);r=this.getAnchor(l.anchor,h,d,t,n)}else r=jy.isPointLike(l)?jy.create(l):new jy;return{[t]:s,[n]:r}}getAnchor(t,e,n,i,s){const r=e.isEdgeElement(n),o=this.graph.options.connecting;let a,l="string"===typeof t?{name:t}:t;if(!l){const t=r?("source"===s?o.sourceEdgeAnchor:o.targetEdgeAnchor)||o.edgeAnchor:("source"===s?o.sourceAnchor:o.targetAnchor)||o.anchor;l="string"===typeof t?{name:t}:t}if(!l)throw new Error("Anchor should be specified.");const c=l.name;if(r){const t=kE.registry.get(c);if("function"!==typeof t)return kE.registry.onNotFound(c);a=Em(t,this,e,n,i,l.args||{},s)}else{const t=CE.registry.get(c);if("function"!==typeof t)return CE.registry.onNotFound(c);a=Em(t,this,e,n,i,l.args||{},s)}return a?a.round(this.POINT_ROUNDING):new jy}findRoutePoints(t=[]){const e=this.graph.options.connecting.router||MS.presets.normal,n=this.cell.getRouter()||e;let i;if("function"===typeof n)i=Em(n,this,t,{},this);else{const e="string"===typeof n?n:n.name,s="string"===typeof n?{}:n.args||{},r=e?MS.registry.get(e):MS.presets.normal;if("function"!==typeof r)return MS.registry.onNotFound(e);i=Em(r,this,t,s,this)}return null==i?t.map((t=>jy.create(t))):i.map((t=>jy.create(t)))}findConnectionPoints(t,e,n){const i=this.cell,s=this.graph.options.connecting,r=i.getSource(),o=i.getTarget(),a=this.sourceView,l=this.targetView,c=t[0],h=t[t.length-1];let u,d;if(a&&!a.isEdgeElement(this.sourceMagnet)){const t=this.sourceMagnet||a.container,i=c||n,o=new Fy(i,e),l=r.connectionPoint||s.sourceConnectionPoint||s.connectionPoint;u=this.getConnectionPoint(l,a,t,o,"source")}else u=e;if(l&&!l.isEdgeElement(this.targetMagnet)){const t=this.targetMagnet||l.container,i=o.connectionPoint||s.targetConnectionPoint||s.connectionPoint,r=h||e,a=new Fy(r,n);d=this.getConnectionPoint(i,l,t,a,"target")}else d=n;return{source:u,target:d}}getConnectionPoint(t,e,n,i,s){const r=i.end;if(null==t)return r;const o="string"===typeof t?t:t.name,a="string"===typeof t?{}:t.args,l=BE.registry.get(o);if("function"!==typeof l)return BE.registry.onNotFound(o);const c=Em(l,this,i,e,n,a||{},s);return c?c.round(this.POINT_ROUNDING):r}updateMarkerAttr(t){const e=this.cell.getAttrs(),n=`.${t}-marker`,i=e&&e[n];i&&this.updateAttrs(this.container,{},{attrs:{[n]:i},selectors:this.selectors})}findMarkerPoints(t,e,n){const i=t=>{const e=this.cell.getAttrs(),n=Object.keys(e);for(let i=0,s=n.length;i0){const t=lv(o);c=e.clone().move(s||n,l.sourceBBox.width*t.sx*-1)}}else{const t=i("source");t&&(c=e.clone().move(s||n,-t))}if(a){if(this.updateMarkerAttr("target"),l.targetBBox=l.targetBBox||Yb(a),l.targetBBox.width>0){const t=lv(a);h=n.clone().move(r||e,l.targetBBox.width*t.sx*-1)}}else{const t=i("target");t&&(h=n.clone().move(r||e,-t))}return l.sourcePoint=c||e.clone(),l.targetPoint=h||n.clone(),{source:c,target:h}}findPath(t,e,n){const i=this.cell.getConnector()||this.graph.options.connecting.connector;let s,r,o;if("string"===typeof i?s=i:(s=i.name,r=i.args),s){const t=HS.registry.get(s);if("function"!==typeof t)return HS.registry.onNotFound(s);o=t}else o=HS.presets.normal;const a=Em(o,this,e,n,t,Object.assign(Object.assign({},r),{raw:!0}),this);return"string"===typeof a?sb.parse(a):a}translateConnectionPoints(t,e){const n=this.markerCache;n.sourcePoint&&n.sourcePoint.translate(t,e),n.targetPoint&&n.targetPoint.translate(t,e),this.sourcePoint.translate(t,e),this.targetPoint.translate(t,e),this.sourceAnchor.translate(t,e),this.targetAnchor.translate(t,e)}updateLabelPositions(){if(null==this.containers.labels)return this;const t=this.path;if(!t)return this;const e=this.cell,n=e.getLabels();if(0===n.length)return this;const i=e.getDefaultLabel(),s=this.normalizeLabelPosition(i.position);for(let r=0,o=n.length;r=this.options.longLength){const s=this.options.doubleToolsOffset||e;i=this.getPointAtLength(n-s),null!=i&&hy(this.tool2Cache,"transform",`translate(${i.x},${i.y}) ${t}`),hy(this.tool2Cache,"visibility","visible")}else this.options.doubleTools&&hy(this.tool2Cache,"visibility","hidden")}return this}updateArrowheadMarkers(){const t=this.containers.arrowheads;if(null==t)return this;if("none"===t.style.display)return this;const e=this.containers.sourceArrowhead,n=this.containers.targetArrowhead;if(e&&n){const t=this.getConnectionLength()||0,i=t{l[t]=o[t]}))}let c;if(c="string"===typeof r?this.findOne(r,this.container,this.selectors):this.containers.connection?this.containers.connection:this.container.querySelector("path"),!(c instanceof SVGPathElement))throw new Error("Token animation requires a valid connection path.");const h="string"===typeof t?this.findOne(t):t;if(null==h)throw new Error("Token animation requires a valid token element.");const u=h.parentNode,d=()=>{u||Qm(h)},p=rb.create(h);u||p.appendTo(this.graph.view.stage);const g=l.complete;l.complete=t=>{d(),n&&n(),g&&g(t)};const f=p.animateAlongPath(l,c);return()=>{d(),f()}}getConnection(){return null!=this.path?this.path.clone():null}getConnectionPathData(){if(null==this.path)return"";const t=this.cache.pathCache;return pl(t,"data")||(t.data=this.path.serialize()),t.data||""}getConnectionSubdivisions(){if(null==this.path)return null;const t=this.cache.pathCache;return pl(t,"segmentSubdivisions")||(t.segmentSubdivisions=this.path.getSegmentSubdivisions()),t.segmentSubdivisions}getConnectionLength(){if(null==this.path)return 0;const t=this.cache.pathCache;return pl(t,"length")||(t.length=this.path.length({segmentSubdivisions:this.getConnectionSubdivisions()})),t.length}getPointAtLength(t){return null==this.path?null:this.path.pointAtLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()})}getPointAtRatio(t){return null==this.path?null:(om(t)&&(t=parseFloat(t)/100),this.path.pointAt(t,{segmentSubdivisions:this.getConnectionSubdivisions()}))}getTangentAtLength(t){return null==this.path?null:this.path.tangentAtLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()})}getTangentAtRatio(t){return null==this.path?null:this.path.tangentAt(t,{segmentSubdivisions:this.getConnectionSubdivisions()})}getClosestPoint(t){return null==this.path?null:this.path.closestPoint(t,{segmentSubdivisions:this.getConnectionSubdivisions()})}getClosestPointLength(t){return null==this.path?null:this.path.closestPointLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()})}getClosestPointRatio(t){return null==this.path?null:this.path.closestPointNormalizedLength(t,{segmentSubdivisions:this.getConnectionSubdivisions()})}getLabelPosition(t,e,n,i){const s={distance:0};let r,o=0;"number"===typeof n?(o=n,r=i):r=n,null!=r&&(s.options=r);const a=r&&r.absoluteOffset,l=!(r&&r.absoluteDistance),c=r&&r.absoluteDistance&&r.reverseDistance,h=this.path,u={segmentSubdivisions:this.getConnectionSubdivisions()},d=new jy(t,e),p=h.closestPointT(d,u),g=this.getConnectionLength()||0;let f,m,y=h.lengthAtT(p,u);if(l&&(y=g>0?y/g:0),c&&(y=-1*(g-y)||1),s.distance=y,a||(f=h.tangentAtT(p)),f)m=f.pointOffset(d);else{const t=h.pointAtT(p),e=d.diff(t);m={x:e.x,y:e.y}}return s.offset=m,s.angle=o,s}normalizeLabelPosition(t){return"number"===typeof t?{distance:t}:t}getLabelTransformationMatrix(t){const e=this.normalizeLabelPosition(t),n=e.options||{},i=e.angle||0,s=e.distance,r=s>0&&s<=1;let o=0;const a={x:0,y:0},l=e.offset;l&&("number"===typeof l?o=l:(null!=l.x&&(a.x=l.x),null!=l.y&&(a.y=l.y)));const c=0!==a.x||0!==a.y||0===o,h=n.keepGradient,u=n.ensureLegibility,d=this.path,p={segmentSubdivisions:this.getConnectionSubdivisions()},g=r?s*this.getConnectionLength():s,f=d.tangentAtLength(g,p);let m,y=i;if(f){if(c)m=f.start,m.translate(a);else{const t=f.clone();t.rotate(-90,f.start),t.setLength(o),m=t.end}h&&(y=f.angle()+i,u&&(y=Ay.normalize((y+90)%180-90)))}else m=d.start,c&&m.translate(a);return Lb().translate(m.x,m.y).rotate(y)}getLabelCoordinates(t){const e=this.getLabelTransformationMatrix(t);return new jy(e.e,e.f)}getVertexIndex(t,e){const n=this.cell,i=n.getVertices(),s=this.getClosestPointLength(new jy(t,e));let r=0;if(null!=s)for(const o=i.length;r(e[s]=t,e[s+1]=t.container===n?void 0:n,e)}beforeArrowheadDragging(t){t.zIndex=this.cell.zIndex,this.cell.toFront();const e=this.container.style;t.pointerEvents=e.pointerEvents,e.pointerEvents="none",this.graph.options.connecting.highlight&&this.highlightAvailableMagnets(t)}afterArrowheadDragging(t){null!=t.zIndex&&(this.cell.setZIndex(t.zIndex,{ui:!0}),t.zIndex=null);const e=this.container;e.style.pointerEvents=t.pointerEvents||"",this.graph.options.connecting.highlight&&this.unhighlightAvailableMagnets(t)}arrowheadDragging(t,e,n,i){i.x=e,i.y=n,i.currentTarget!==t&&(i.currentMagnet&&i.currentView&&i.currentView.unhighlight(i.currentMagnet,{type:"magnetAdsorbed"}),i.currentView=this.graph.renderer.findViewByElem(t),i.currentView?(i.currentMagnet=i.currentView.findMagnet(t),i.currentMagnet&&this.graph.hook.validateConnection(...i.getValidateConnectionArgs(i.currentView,i.currentMagnet),i.currentView.getEdgeTerminal(i.currentMagnet,e,n,this.cell,i.terminalType))?i.currentView.highlight(i.currentMagnet,{type:"magnetAdsorbed"}):i.currentMagnet=null):i.currentMagnet=null),i.currentTarget=t,this.cell.prop(i.terminalType,{x:e,y:n},Object.assign(Object.assign({},i.options),{ui:!0}))}arrowheadDragged(t,e,n){const i=t.currentView,s=t.currentMagnet;if(!s||!i)return;i.unhighlight(s,{type:"magnetAdsorbed"});const r=t.terminalType,o=i.getEdgeTerminal(s,e,n,this.cell,r);this.cell.setTerminal(r,o,{ui:!0})}snapArrowhead(t,e,n){const i=this.graph,s=i.options.connecting.snap,r="object"===typeof s&&s.radius||50,o=i.renderer.findViewsInArea({x:t-r,y:e-r,width:2*r,height:2*r}),a=n.closestView||null,l=n.closestMagnet||null;let c;n.closestView=null,n.closestMagnet=null;let h=Number.MAX_SAFE_INTEGER;const u=new jy(t,e);let d;o.forEach((s=>{"false"!==s.container.getAttribute("magnet")&&(c=s.cell.getBBox().getCenter().distance(u),c{if("false"!==o.getAttribute("magnet")){const a=s.getBBoxOfElement(o);c=u.distance(a.getCenter()),ce.hook.validateConnection(...t.getValidateConnectionArgs(s,n),s.getEdgeTerminal(n,t.x,t.y,this.cell,t.terminalType))));if(o.length>0){for(let t=0,e=o.length;t{const n=this.graph.renderer.findViewByCell(t);if(n){const i=e[t];i.forEach((t=>{n.unhighlight(t,{type:"magnetAvailable"})})),n.unhighlight(null,{type:"nodeAvailable"})}})),t.marked=null}startArrowheadDragging(t,e,n){if(!this.can("arrowheadMovable"))return void this.notifyUnhandledMouseDown(t,e,n);const i=t.target,s=i.getAttribute("data-terminal"),r=this.prepareArrowheadDragging(s,{x:e,y:n});this.setEventData(t,r)}dragArrowhead(t,e,n){const i=this.getEventData(t);this.graph.options.connecting.snap?this.snapArrowhead(e,n,i):this.arrowheadDragging(this.getEventTarget(t),e,n,i)}stopArrowheadDragging(t,e,n){const i=this.graph,s=this.getEventData(t);i.options.connecting.snap?this.snapArrowheadEnd(s):this.arrowheadDragged(s,e,n);const r=i.hook.validateEdge(this.cell,s.terminalType,s.initialTerminal);r?(this.finishEmbedding(s),this.notifyConnectionEvent(s,t)):this.fallbackConnection(s),this.afterArrowheadDragging(s)}startLabelDragging(t,e,n){if(this.can("edgeLabelMovable")){const e=t.currentTarget,n=parseInt(e.getAttribute("data-index"),10),i=this.getLabelPositionAngle(n),s=this.getLabelPositionArgs(n),r=this.getDefaultLabelPositionArgs(),o=this.mergeLabelPositionArgs(s,r);this.setEventData(t,{index:n,positionAngle:i,positionArgs:o,stopPropagation:!0,action:"drag-label"})}else this.setEventData(t,{stopPropagation:!0});this.graph.view.delegateDragEvents(t,this)}dragLabel(t,e,n){const i=this.getEventData(t),s=this.cell.getLabelAt(i.index),r=kc({},s,{position:this.getLabelPosition(e,n,i.positionAngle,i.positionArgs)});this.cell.setLabelAt(i.index,r)}stopLabelDragging(t,e,n){}handleVertexAdding(t,e,n){if(!this.can("vertexAddable"))return void this.notifyUnhandledMouseDown(t,e,n);const i=this.addVertex({x:e,y:n},{ui:!0});this.setEventData(t,{index:i,action:"drag-vertex"})}handleVertexRemoving(t,e,n){if(!this.can("vertexDeletable"))return void this.notifyUnhandledMouseDown(t,e,n);const i=t.target,s=parseInt(i.getAttribute("idx"),10);this.cell.removeVertexAt(s)}startVertexDragging(t,e,n){if(!this.can("vertexMovable"))return void this.notifyUnhandledMouseDown(t,e,n);const i=t.target,s=parseInt(i.getAttribute("idx"),10);this.setEventData(t,{index:s,action:"drag-vertex"})}dragVertex(t,e,n){const i=this.getEventData(t);this.cell.setVertexAt(i.index,{x:e,y:n},{ui:!0})}stopVertexDragging(t,e,n){}}(function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return(null==n||n===t.toStringTag)&&"function"===typeof i.isNodeView&&"function"===typeof i.isEdgeView&&"function"===typeof i.confirmUpdate&&"function"===typeof i.update&&"function"===typeof i.getConnection}t.toStringTag=`X6.${t.name}`,t.isEdgeView=e})(pA||(pA={})),pA.config({isSvgElement:!0,priority:1,bootstrap:["render","source","target"],actions:{view:["render"],markup:["render"],attrs:["update"],source:["source","update"],target:["target","update"],router:["update"],connector:["update"],labels:["labels"],defaultLabel:["labels"],vertices:["vertices","update"],vertexMarkup:["vertices"],toolMarkup:["tools"],tools:["widget"]},shortLength:105,longLength:155,toolsOffset:40,doubleTools:!1,doubleToolsOffset:65,sampleInterval:50}),pA.registry.register("edge",pA,!0);class gA extends Rx{constructor(){super(...arguments),this.scalableNode=null,this.rotatableNode=null,this.scalableSelector="scalable",this.rotatableSelector="rotatable",this.defaultPortMarkup=Nx.getPortMarkup(),this.defaultPortLabelMarkup=Nx.getPortLabelMarkup(),this.defaultPortContainerMarkup=Nx.getPortContainerMarkup(),this.portsCache={}}get[Symbol.toStringTag](){return gA.toStringTag}getContainerClassName(){const t=[super.getContainerClassName(),this.prefixClassName("node")];return this.can("nodeMovable")||t.push(this.prefixClassName("node-immovable")),t.join(" ")}updateClassName(t){const e=t.target;if(e.hasAttribute("magnet")){const t=this.prefixClassName("port-unconnectable");this.can("magnetConnectable")?Lm(e,t):jm(e,t)}else{const t=this.prefixClassName("node-immovable");this.can("nodeMovable")?this.removeClass(t):this.addClass(t)}}isNodeView(){return!0}confirmUpdate(t,e={}){let n=t;return this.hasAction(n,"ports")&&(this.removePorts(),this.cleanPortsCache()),this.hasAction(n,"render")?(this.render(),n=this.removeAction(n,["render","update","resize","translate","rotate","ports","tools"])):(n=this.handleAction(n,"resize",(()=>this.resize(e)),"update"),n=this.handleAction(n,"update",(()=>this.update()),Cw.useCSSSelector?"ports":null),n=this.handleAction(n,"translate",(()=>this.translate())),n=this.handleAction(n,"rotate",(()=>this.rotate())),n=this.handleAction(n,"ports",(()=>this.renderPorts())),n=this.handleAction(n,"tools",(()=>this.renderTools()))),n}update(t){this.cleanCache(),Cw.useCSSSelector&&this.removePorts();const e=this.cell,n=e.getSize(),i=e.getAttrs();this.updateAttrs(this.container,i,{attrs:t===i?null:t,rootBBox:new Ly(0,0,n.width,n.height),selectors:this.selectors,scalableNode:this.scalableNode,rotatableNode:this.rotatableNode}),Cw.useCSSSelector&&this.renderPorts()}renderMarkup(){const t=this.cell.markup;if(t)return"string"===typeof t?this.renderStringMarkup(t):this.renderJSONMarkup(t);throw new TypeError("Invalid node markup.")}renderJSONMarkup(t){const e=this.parseJSONMarkup(t,this.container),n=t=>Array.isArray(t)?t[0]:t;this.selectors=e.selectors,this.rotatableNode=n(this.selectors[this.rotatableSelector]),this.scalableNode=n(this.selectors[this.scalableSelector]),this.container.appendChild(e.fragment)}renderStringMarkup(t){ey(this.container,rb.toNodes(rb.createVectors(t))),this.rotatableNode=Jm(this.container,`.${this.rotatableSelector}`),this.scalableNode=Jm(this.container,`.${this.scalableSelector}`),this.selectors={},this.rootSelector&&(this.selectors[this.rootSelector]=this.container)}render(){return this.empty(),this.renderMarkup(),this.scalableNode&&this.update(),this.resize(),this.rotatableNode?(this.rotate(),this.translate()):this.updateTransform(),Cw.useCSSSelector||this.renderPorts(),this.renderTools(),this}resize(t={}){if(this.scalableNode)return this.updateSize(t);this.cell.getAngle()&&this.rotate(),this.update()}translate(){if(this.rotatableNode)return this.updateTranslation();this.updateTransform()}rotate(){if(this.rotatableNode)return this.updateRotation(),void this.update();this.updateTransform()}getTranslationString(){const t=this.cell.getPosition();return`translate(${t.x},${t.y})`}getRotationString(){const t=this.cell.getAngle();if(t){const e=this.cell.getSize();return`rotate(${t},${e.width/2},${e.height/2})`}}updateTransform(){let t=this.getTranslationString();const e=this.getRotationString();e&&(t+=` ${e}`),this.container.setAttribute("transform",t)}updateRotation(){if(null!=this.rotatableNode){const t=this.getRotationString();null!=t?this.rotatableNode.setAttribute("transform",t):this.rotatableNode.removeAttribute("transform")}}updateTranslation(){this.container.setAttribute("transform",this.getTranslationString())}updateSize(t={}){const e=this.cell,n=e.getSize(),i=e.getAngle(),s=this.scalableNode;let r=!1;s.getElementsByTagName("path").length>0&&(r=!0);const o=Yb(s,{recursive:r}),a=n.width/(o.width||1),l=n.height/(o.height||1);s.setAttribute("transform",`scale(${a},${l})`);const c=this.rotatableNode;if(null!=c){const r=c.getAttribute("transform");if(r){c.setAttribute("transform",`${r} rotate(${-i},${n.width/2},${n.height/2})`);const o=Yb(s,{target:this.graph.view.stage});e.prop("position",{x:o.x,y:o.y},Object.assign({updated:!0},t)),this.translate(),this.rotate()}}this.update()}findPortElem(t,e){const n=t?this.portsCache[t]:null;if(!n)return null;const i=n.portContentElement,s=n.portContentSelectors||{};return this.findOne(e,i,s)}initializePorts(){this.cleanPortsCache()}refreshPorts(){this.removePorts(),this.cleanPortsCache(),this.renderPorts()}cleanPortsCache(){this.portsCache={}}removePorts(){Object.keys(this.portsCache).forEach((t=>{const e=this.portsCache[t];Qm(e.portElement)}))}renderPorts(){const t=this.getPortsContainer(),e=[];t.childNodes.forEach((t=>{e.push(t)}));const n=nl(this.cell.getParsedPorts(),"zIndex"),i="auto";n[i]&&n[i].forEach((n=>{const i=this.getPortElement(n);t.append(i),e.push(i)})),Object.keys(n).forEach((t=>{if(t!==i){const i=parseInt(t,10);this.appendPorts(n[t],i,e)}})),this.updatePorts()}getPortsContainer(){return this.rotatableNode||this.container}appendPorts(t,e,n){const i=t.map((t=>this.getPortElement(t)));n[e]||e<0?iy(n[Math.max(e,0)],i):ey(this.getPortsContainer(),i)}getPortElement(t){const e=this.portsCache[t.id];return e?e.portElement:this.createPortElement(t)}createPortElement(t){let e=Nx.renderMarkup(this.getPortContainerMarkup());const n=e.elem;if(null==n)throw new Error("Invalid port container markup.");e=Nx.renderMarkup(this.getPortMarkup(t));const i=e.elem,s=e.selectors;if(null==i)throw new Error("Invalid port markup.");this.setAttrs({port:t.id,"port-group":t.group},i),e=Nx.renderMarkup(this.getPortLabelMarkup(t.label));const r=e.elem,o=e.selectors;if(null==r)throw new Error("Invalid port label markup.");let a;if(s&&o){for(const t in o)if(s[t]&&t!==this.rootSelector)throw new Error("Selectors within port must be unique.");a=Object.assign(Object.assign({},s),o)}else a=s||o;return jm(n,"x6-port"),jm(i,"x6-port-body"),jm(r,"x6-port-label"),n.appendChild(i),n.appendChild(r),this.portsCache[t.id]={portElement:n,portSelectors:a,portLabelElement:r,portLabelSelectors:o,portContentElement:i,portContentSelectors:s},this.graph.hook.onPortRendered({port:t,node:this.cell,container:n,selectors:a,labelContainer:r,labelSelectors:o,contentContainer:i,contentSelectors:s}),n}updatePorts(){this.updatePortGroup();const t=this.cell.getParsedGroups();Object.keys(t).forEach((t=>this.updatePortGroup(t)))}updatePortGroup(t){const e=Ly.fromSize(this.cell.getSize()),n=this.cell.getPortsLayoutByGroup(t,e);for(let i=0,s=n.length;ithis.graph.options.clickThreshold||this.notify("node:magnet:click",Object.assign({magnet:e},this.getEventArgs(t,n,i)))}onMagnetDblClick(t,e,n,i){this.notify("node:magnet:dblclick",Object.assign({magnet:e},this.getEventArgs(t,n,i)))}onMagnetContextMenu(t,e,n,i){this.notify("node:magnet:contextmenu",Object.assign({magnet:e},this.getEventArgs(t,n,i)))}onMagnetMouseDown(t,e,n,i){this.startMagnetDragging(t,n,i)}onCustomEvent(t,e,n,i){this.notify("node:customevent",Object.assign({name:e},this.getEventArgs(t,n,i))),super.onCustomEvent(t,e,n,i)}prepareEmbedding(t){const e=this.getEventData(t),n=e.cell||this.cell,i=this.graph.findViewByCell(n),s=this.graph.snapToGrid(t.clientX,t.clientY);this.notify("node:embed",{e:t,node:n,view:i,cell:n,x:s.x,y:s.y,currentParent:n.getParent()})}processEmbedding(t,e){const n=e.cell||this.cell,i=e.graph||this.graph,s=i.options.embedding,r=s.findParent;let o="function"===typeof r?Em(r,i,{view:this,node:this.cell}).filter((t=>ZS.isCell(t)&&this.cell.id!==t.id&&!t.isDescendantOf(this.cell))):i.model.getNodesUnderNode(n,{by:r});s.frontOnly&&(o=o.slice(-1));let a=null;const l=e.candidateEmbedView,c=s.validate;for(let u=o.length-1;u>=0;u-=1){const t=o[u];if(l&&l.cell.id===t.id){a=l;break}{const e=t.findView(i);if(Em(c,i,{child:this.cell,parent:e.cell,childView:this,parentView:e})){a=e;break}}}this.clearEmbedding(e),a&&a.highlight(null,{type:"embedding"}),e.candidateEmbedView=a;const h=i.snapToGrid(t.clientX,t.clientY);this.notify("node:embedding",{e:t,cell:n,node:n,view:i.findViewByCell(n),x:h.x,y:h.y,currentParent:n.getParent(),candidateParent:a?a.cell:null})}clearEmbedding(t){const e=t.candidateEmbedView;e&&(e.unhighlight(null,{type:"embedding"}),t.candidateEmbedView=null)}finalizeEmbedding(t,e){const n=e.cell||this.cell,i=e.graph||this.graph,s=i.findViewByCell(n),r=n.getParent(),o=e.candidateEmbedView;o?(o.unhighlight(null,{type:"embedding"}),e.candidateEmbedView=null,null!=r&&r.id===o.cell.id||o.cell.insertChild(n,void 0,{ui:!0})):r&&r.unembed(n,{ui:!0}),i.model.getConnectedEdges(n,{deep:!0}).forEach((t=>{t.updateParent({ui:!0})}));const a=i.snapToGrid(t.clientX,t.clientY);s&&s.notify("node:embedded",{e:t,cell:n,x:a.x,y:a.y,node:n,view:i.findViewByCell(n),previousParent:r,currentParent:n.getParent()})}getDelegatedView(){let t=this.cell,e=this;while(e){if(t.isEdge())break;if(!t.hasParent()||e.can("stopDelegateOnDragging"))return e;t=t.getParent(),e=this.graph.renderer.findViewByCell(t)}return null}startMagnetDragging(t,e,n){if(!this.can("magnetConnectable"))return;t.stopPropagation();const i=t.currentTarget,s=this.graph;this.setEventData(t,{targetMagnet:i}),s.hook.validateMagnet(this,i,t)?(s.options.magnetThreshold<=0&&this.startConnectting(t,i,e,n),this.setEventData(t,{action:"magnet"}),this.stopPropagation(t)):this.onMouseDown(t,e,n),s.view.delegateDragEvents(t,this)}startConnectting(t,e,n,i){this.graph.model.startBatch("add-edge");const s=this.createEdgeFromMagnet(e,n,i);s.notifyMouseDown(t,n,i),s.setEventData(t,s.prepareArrowheadDragging("target",{x:n,y:i,isNewEdge:!0,fallbackAction:"remove"})),this.setEventData(t,{edgeView:s})}createEdgeFromMagnet(t,e,n){const i=this.graph,s=i.model,r=i.hook.getDefaultEdge(this,t);return r.setSource(Object.assign(Object.assign({},r.getSource()),this.getEdgeTerminal(t,e,n,r,"source"))),r.setTarget(Object.assign(Object.assign({},r.getTarget()),{x:e,y:n})),r.addTo(s,{async:!1,ui:!0}),r.findView(i)}dragMagnet(t,e,n){const i=this.getEventData(t),s=i.edgeView;if(s)s.onMouseMove(t,e,n),this.autoScrollGraph(t.clientX,t.clientY);else{const s=this.graph,r=s.options.magnetThreshold,o=this.getEventTarget(t),a=i.targetMagnet;if("onleave"===r){if(a===o||a.contains(o))return}else if(s.view.getMouseMovedCount(t)<=r)return;this.startConnectting(t,a,e,n)}}stopMagnetDragging(t,e,n){const i=this.eventData(t),s=i.edgeView;s&&(s.onMouseUp(t,e,n),this.graph.model.stopBatch("add-edge"))}notifyUnhandledMouseDown(t,e,n){this.notify("node:unhandled:mousedown",{e:t,x:e,y:n,view:this,cell:this.cell,node:this.cell})}notifyNodeMove(t,e,n,i,s){let r=[s];const o=this.graph.selection.widget;if(o&&o.options.movable){const t=this.graph.getSelectedCells();t.includes(s)&&(r=t.filter((t=>t.isNode())))}r.forEach((s=>{this.notify(t,{e:e,x:n,y:i,cell:s,node:s,view:s.findView(this.graph)})}))}startNodeDragging(t,e,n){const i=this.getDelegatedView();if(null==i||!i.can("nodeMovable"))return this.notifyUnhandledMouseDown(t,e,n);this.setEventData(t,{targetView:i,action:"move"});const s=jy.create(i.cell.getPosition());i.setEventData(t,{moving:!1,offset:s.diff(e,n),restrict:this.graph.hook.getRestrictArea(i)})}dragNode(t,e,n){const i=this.cell,s=this.graph,r=s.getGridSize(),o=this.getEventData(t),a=o.offset,l=o.restrict;o.moving||(o.moving=!0,this.addClass("node-moving"),this.notifyNodeMove("node:move",t,e,n,this.cell)),this.autoScrollGraph(t.clientX,t.clientY);const c=ww.snapToGrid(e+a.x,r),h=ww.snapToGrid(n+a.y,r);i.setPosition(c,h,{restrict:l,deep:!0,ui:!0}),s.options.embedding.enabled&&(o.embedding||(this.prepareEmbedding(t),o.embedding=!0),this.processEmbedding(t,o))}stopNodeDragging(t,e,n){const i=this.getEventData(t);i.embedding&&this.finalizeEmbedding(t,i),i.moving&&(this.removeClass("node-moving"),this.notifyNodeMove("node:moved",t,e,n,this.cell)),i.moving=!1,i.embedding=!1}autoScrollGraph(t,e){const n=this.graph.scroller.widget;n&&n.autoScroll(t,e)}}(function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return(null==n||n===t.toStringTag)&&"function"===typeof i.isNodeView&&"function"===typeof i.isEdgeView&&"function"===typeof i.confirmUpdate&&"function"===typeof i.update&&"function"===typeof i.findPortElem&&"function"===typeof i.resize&&"function"===typeof i.rotate&&"function"===typeof i.translate}t.toStringTag=`X6.${t.name}`,t.isNodeView=e})(gA||(gA={})),gA.config({isSvgElement:!0,priority:0,bootstrap:["render"],actions:{view:["render"],markup:["render"],attrs:["update"],size:["resize","ports","tools"],angle:["rotate","tools"],position:["translate","tools"],ports:["ports"],tools:["tools"]}}),gA.registry.register("node",gA,!0);const fA=rA("text");class mA extends(aA("text",{view:fA,attrs:{text:{fontSize:18,fill:"#000000",stroke:null,refX:.5,refY:.5}}},{noText:!0})){}(function(t){class e extends gA{confirmUpdate(t,e={}){let n=super.confirmUpdate(t,e);return this.hasAction(n,"scale")&&(this.resize(),n=this.removeAction(n,"scale")),n}}t.View=e,e.config({actions:{attrs:["scale"]}}),gA.registry.register(fA,e)})(mA||(mA={}));class yA extends px{constructor(t,e={}){super(),this.length=0,this.comparator=e.comparator||"zIndex",this.clean(),t&&this.reset(t,{silent:!0})}toJSON(){return this.cells.map((t=>t.toJSON()))}add(t,e,n){let i,s;"number"===typeof e?(i=e,s=Object.assign({merge:!1},n)):(i=this.length,s=Object.assign({merge:!1},e)),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);const r=Array.isArray(t)?t:[t],o=this.comparator&&"number"!==typeof e&&!1!==s.sort,a=this.comparator||null;let l=!1;const c=[],h=[];return r.forEach((t=>{const e=this.get(t);e?s.merge&&!t.isSameStore(e)&&(e.setProp(t.getProp(),n),h.push(e),o&&!l&&(l=null==a||"function"===typeof a?e.hasChanged():"string"===typeof a?e.hasChanged(a):a.some((t=>e.hasChanged(t))))):(c.push(t),this.reference(t))})),c.length&&(o&&(l=!0),this.cells.splice(i,0,...c),this.length=this.cells.length),l&&this.sort({silent:!0}),s.silent||(c.forEach(((t,e)=>{const n={cell:t,index:i+e,options:s};this.trigger("added",n),s.dryrun||t.notify("added",Object.assign({},n))})),l&&this.trigger("sorted"),(c.length||h.length)&&this.trigger("updated",{added:c,merged:h,removed:[],options:s})),this}remove(t,e={}){const n=Array.isArray(t)?t:[t],i=this.removeCells(n,e);return!e.silent&&i.length>0&&this.trigger("updated",{options:e,removed:i,added:[],merged:[]}),Array.isArray(t)?i:i[0]}removeCells(t,e){const n=[];for(let i=0;ithis.unreference(t))),this.clean(),this.add(t,Object.assign({silent:!0},e)),!e.silent){const t=this.cells.slice();this.trigger("reseted",{options:e,previous:n,current:t});const i=[],s=[];t.forEach((t=>{const e=n.some((e=>e.id===t.id));e||i.push(t)})),n.forEach((e=>{const n=t.some((t=>t.id===e.id));n||s.push(e)})),this.trigger("updated",{options:e,added:i,removed:s,merged:[]})}return this}push(t,e){return this.add(t,this.length,e)}pop(t){const e=this.at(this.length-1);return this.remove(e,t)}unshift(t,e){return this.add(t,0,e)}shift(t){const e=this.at(0);return this.remove(e,t)}get(t){if(null==t)return null;const e="string"===typeof t||"number"===typeof t?t:t.id;return this.map[e]||null}has(t){return null!=this.get(t)}at(t){return t<0&&(t+=this.length),this.cells[t]||null}first(){return this.at(0)}last(){return this.at(-1)}indexOf(t){return this.cells.indexOf(t)}toArray(){return this.cells.slice()}sort(t={}){return null!=this.comparator&&(this.cells=Ha(this.cells,this.comparator),t.silent||this.trigger("sorted")),this}clone(){const t=this.constructor;return new t(this.cells.slice(),{comparator:this.comparator})}reference(t){this.map[t.id]=t,t.on("*",this.notifyCellEvent,this)}unreference(t){t.off("*",this.notifyCellEvent,this),delete this.map[t.id]}notifyCellEvent(t,e){const n=e.cell;this.trigger(`cell:${t}`,e),n&&(n.isNode()?this.trigger(`node:${t}`,Object.assign(Object.assign({},e),{node:n})):n.isEdge()&&this.trigger(`edge:${t}`,Object.assign(Object.assign({},e),{edge:n})))}clean(){this.length=0,this.cells=[],this.map={}}}class bA extends px{constructor(t=[]){super(),this.batches={},this.addings=new WeakMap,this.nodes={},this.edges={},this.outgoings={},this.incomings={},this.collection=new yA(t),this.setup()}get[Symbol.toStringTag](){return bA.toStringTag}notify(t,e){this.trigger(t,e);const n=this.graph;return n&&("sorted"===t||"reseted"===t||"updated"===t?n.trigger(`model:${t}`,e):n.trigger(t,e)),this}setup(){const t=this.collection;t.on("sorted",(()=>this.notify("sorted",null))),t.on("updated",(t=>this.notify("updated",t))),t.on("cell:change:zIndex",(()=>this.sortOnChangeZ())),t.on("added",(({cell:t})=>{this.onCellAdded(t)})),t.on("removed",(t=>{const e=t.cell;this.onCellRemoved(e,t.options),this.notify("cell:removed",t),e.isNode()?this.notify("node:removed",Object.assign(Object.assign({},t),{node:e})):e.isEdge()&&this.notify("edge:removed",Object.assign(Object.assign({},t),{edge:e}))})),t.on("reseted",(t=>{this.onReset(t.current),this.notify("reseted",t)})),t.on("edge:change:source",(({edge:t})=>this.onEdgeTerminalChanged(t,"source"))),t.on("edge:change:target",(({edge:t})=>{this.onEdgeTerminalChanged(t,"target")}))}sortOnChangeZ(){this.collection.sort()}onCellAdded(t){const e=t.id;t.isEdge()?(t.updateParent(),this.edges[e]=!0,this.onEdgeTerminalChanged(t,"source"),this.onEdgeTerminalChanged(t,"target")):this.nodes[e]=!0}onCellRemoved(t,e){const n=t.id;if(t.isEdge()){delete this.edges[n];const e=t.getSource(),i=t.getTarget();if(e&&e.cell){const t=this.outgoings[e.cell],i=t?t.indexOf(n):-1;i>=0&&(t.splice(i,1),0===t.length&&delete this.outgoings[e.cell])}if(i&&i.cell){const t=this.incomings[i.cell],e=t?t.indexOf(n):-1;e>=0&&(t.splice(e,1),0===t.length&&delete this.incomings[i.cell])}}else delete this.nodes[n];e.clear||(e.disconnectEdges?this.disconnectConnectedEdges(t,e):this.removeConnectedEdges(t,e)),t.model===this&&(t.model=null)}onReset(t){this.nodes={},this.edges={},this.outgoings={},this.incomings={},t.forEach((t=>this.onCellAdded(t)))}onEdgeTerminalChanged(t,e){const n="source"===e?this.outgoings:this.incomings,i=t.previous(e);if(i&&i.cell){const e=n[i.cell],s=e?e.indexOf(t.id):-1;s>=0&&(e.splice(s,1),0===e.length&&delete n[i.cell])}const s=t.getTerminal(e);if(s&&s.cell){const e=n[s.cell]||[],i=e.indexOf(t.id);-1===i&&e.push(t.id),n[s.cell]=e}}prepareCell(t,e){return t.model||e&&e.dryrun||(t.model=this),null==t.zIndex&&t.setZIndex(this.getMaxZIndex()+1,{silent:!0}),t}resetCells(t,e={}){return t.map((t=>this.prepareCell(t,Object.assign(Object.assign({},e),{dryrun:!0})))),this.collection.reset(t,e),t.map((t=>this.prepareCell(t,{options:e}))),this}clear(t={}){const e=this.getCells();if(0===e.length)return this;const n=Object.assign(Object.assign({},t),{clear:!0});return this.batchUpdate("clear",(()=>{const t=e.sort(((t,e)=>{const n=t.isEdge()?1:2,i=e.isEdge()?1:2;return n-i}));while(t.length>0){const e=t.shift();e&&e.remove(n)}}),n),this}addNode(t,e={}){const n=tA.isNode(t)?t:this.createNode(t);return this.addCell(n,e),n}createNode(t){return tA.create(t)}addEdge(t,e={}){const n=uA.isEdge(t)?t:this.createEdge(t);return this.addCell(n,e),n}createEdge(t){return uA.create(t)}addCell(t,e={}){return Array.isArray(t)?this.addCells(t,e):(this.collection.has(t)||this.addings.has(t)||(this.addings.set(t,!0),this.collection.add(this.prepareCell(t,e),e),t.eachChild((t=>this.addCell(t,e))),this.addings.delete(t)),this)}addCells(t,e={}){const n=t.length;if(0===n)return this;const i=Object.assign(Object.assign({},e),{position:n-1,maxPosition:n-1});return this.startBatch("add",Object.assign(Object.assign({},i),{cells:t})),t.forEach((t=>{this.addCell(t,i),i.position-=1})),this.stopBatch("add",Object.assign(Object.assign({},i),{cells:t})),this}removeCell(t,e={}){const n="string"===typeof t?this.getCell(t):t;return n&&this.has(n)?this.collection.remove(n,e):null}updateCellId(t,e){this.startBatch("update",{id:e}),t.prop("id",e);const n=t.clone({keepId:!0});this.addCell(n);const i=this.getConnectedEdges(t);return i.forEach((n=>{const i=n.getSourceCell(),s=n.getTargetCell();i===t&&n.setSource(Object.assign(Object.assign({},n.getSource()),{cell:e})),s===t&&n.setTarget(Object.assign(Object.assign({},n.getTarget()),{cell:e}))})),this.removeCell(t),this.stopBatch("update",{id:e}),n}removeCells(t,e={}){return t.length?this.batchUpdate("remove",(()=>t.map((t=>this.removeCell(t,e))))):[]}removeConnectedEdges(t,e={}){const n=this.getConnectedEdges(t);return n.forEach((t=>{t.remove(e)})),n}disconnectConnectedEdges(t,e={}){const n="string"===typeof t?t:t.id;this.getConnectedEdges(t).forEach((t=>{const i=t.getSourceCell(),s=t.getTargetCell();i&&i.id===n&&t.setSource({x:0,y:0},e),s&&s.id===n&&t.setTarget({x:0,y:0},e)}))}has(t){return this.collection.has(t)}total(){return this.collection.length}indexOf(t){return this.collection.indexOf(t)}getCell(t){return this.collection.get(t)}getCells(){return this.collection.toArray()}getFirstCell(){return this.collection.first()}getLastCell(){return this.collection.last()}getMinZIndex(){const t=this.collection.first();return t&&t.getZIndex()||0}getMaxZIndex(){const t=this.collection.last();return t&&t.getZIndex()||0}getCellsFromCache(t){return t?Object.keys(t).map((t=>this.getCell(t))).filter((t=>null!=t)):[]}getNodes(){return this.getCellsFromCache(this.nodes)}getEdges(){return this.getCellsFromCache(this.edges)}getOutgoingEdges(t){const e="string"===typeof t?t:t.id,n=this.outgoings[e];return n?n.map((t=>this.getCell(t))).filter((t=>t&&t.isEdge())):null}getIncomingEdges(t){const e="string"===typeof t?t:t.id,n=this.incomings[e];return n?n.map((t=>this.getCell(t))).filter((t=>t&&t.isEdge())):null}getConnectedEdges(t,e={}){const n=[],i="string"===typeof t?this.getCell(t):t;if(null==i)return n;const s={},r=e.indirect;let o=e.incoming,a=e.outgoing;null==o&&null==a&&(o=a=!0);const l=(t,e)=>{const i=e?this.getOutgoingEdges(t):this.getIncomingEdges(t);if(null!=i&&i.forEach((t=>{s[t.id]||(n.push(t),s[t.id]=!0,r&&(o&&l(t,!1),a&&l(t,!0)))})),r&&t.isEdge()){const i=e?t.getTargetCell():t.getSourceCell();i&&i.isEdge()&&(s[i.id]||(n.push(i),l(i,e)))}};if(a&&l(i,!0),o&&l(i,!1),e.deep){const t=i.getDescendants({deep:!0}),r={};t.forEach((t=>{t.isNode()&&(r[t.id]=!0)}));const l=(t,i)=>{const o=i?this.getOutgoingEdges(t.id):this.getIncomingEdges(t.id);null!=o&&o.forEach((t=>{if(!s[t.id]){const i=t.getSourceCell(),o=t.getTargetCell();if(!e.enclosed&&i&&r[i.id]&&o&&r[o.id])return;n.push(t),s[t.id]=!0}}))};t.forEach((t=>{t.isEdge()||(a&&l(t,!0),o&&l(t,!1))}))}return n}isBoundary(t,e){const n="string"===typeof t?this.getCell(t):t,i=e?this.getIncomingEdges(n):this.getOutgoingEdges(n);return null==i||0===i.length}getBoundaryNodes(t){const e=[];return Object.keys(this.nodes).forEach((n=>{if(this.isBoundary(n,t)){const t=this.getCell(n);t&&e.push(t)}})),e}getRoots(){return this.getBoundaryNodes(!0)}getLeafs(){return this.getBoundaryNodes(!1)}isRoot(t){return this.isBoundary(t,!0)}isLeaf(t){return this.isBoundary(t,!1)}getNeighbors(t,e={}){let n=e.incoming,i=e.outgoing;null==n&&null==i&&(n=i=!0);const s=this.getConnectedEdges(t,e),r=s.reduce(((s,r)=>{const o=r.hasLoop(e),a=r.getSourceCell(),l=r.getTargetCell();return n&&a&&a.isNode()&&!s[a.id]&&(!o&&(a===t||e.deep&&a.isDescendantOf(t))||(s[a.id]=a)),i&&l&&l.isNode()&&!s[l.id]&&(!o&&(l===t||e.deep&&l.isDescendantOf(t))||(s[l.id]=l)),s}),{});if(t.isEdge()){if(n){const e=t.getSourceCell();e&&e.isNode()&&!r[e.id]&&(r[e.id]=e)}if(i){const e=t.getTargetCell();e&&e.isNode()&&!r[e.id]&&(r[e.id]=e)}}return Object.keys(r).map((t=>r[t]))}isNeighbor(t,e,n={}){let i=n.incoming,s=n.outgoing;return null==i&&null==s&&(i=s=!0),this.getConnectedEdges(t,n).some((t=>{const n=t.getSourceCell(),r=t.getTargetCell();return!(!i||!n||n.id!==e.id)||!(!s||!r||r.id!==e.id)}))}getSuccessors(t,e={}){const n=[];return this.search(t,((i,s)=>{i!==t&&this.matchDistance(s,e.distance)&&n.push(i)}),Object.assign(Object.assign({},e),{outgoing:!0})),n}isSuccessor(t,e,n={}){let i=!1;return this.search(t,((s,r)=>{if(s===e&&s!==t&&this.matchDistance(r,n.distance))return i=!0,!1}),Object.assign(Object.assign({},n),{outgoing:!0})),i}getPredecessors(t,e={}){const n=[];return this.search(t,((i,s)=>{i!==t&&this.matchDistance(s,e.distance)&&n.push(i)}),Object.assign(Object.assign({},e),{incoming:!0})),n}isPredecessor(t,e,n={}){let i=!1;return this.search(t,((s,r)=>{if(s===e&&s!==t&&this.matchDistance(r,n.distance))return i=!0,!1}),Object.assign(Object.assign({},n),{incoming:!0})),i}matchDistance(t,e){return null==e||("function"===typeof e?e(t):!(!Array.isArray(e)||!e.includes(t))||t===e)}getCommonAncestor(...t){const e=[];return t.forEach((t=>{t&&(Array.isArray(t)?e.push(...t):e.push(t))})),ZS.getCommonAncestor(...e)}getSubGraph(t,e={}){const n=[],i={},s=[],r=[],o=t=>{i[t.id]||(n.push(t),i[t.id]=t,t.isEdge()&&r.push(t),t.isNode()&&s.push(t))};return t.forEach((t=>{if(o(t),e.deep){const e=t.getDescendants({deep:!0});e.forEach((t=>o(t)))}})),r.forEach((t=>{const e=t.getSourceCell(),r=t.getTargetCell();e&&!i[e.id]&&(n.push(e),i[e.id]=e,e.isNode()&&s.push(e)),r&&!i[r.id]&&(n.push(r),i[r.id]=r,r.isNode()&&s.push(r))})),s.forEach((t=>{const s=this.getConnectedEdges(t,e);s.forEach((t=>{const e=t.getSourceCell(),s=t.getTargetCell();!i[t.id]&&e&&i[e.id]&&s&&i[s.id]&&(n.push(t),i[t.id]=t)}))})),n}cloneSubGraph(t,e={}){const n=this.getSubGraph(t,e);return this.cloneCells(n)}cloneCells(t){return ZS.cloneCells(t)}getNodesFromPoint(t,e){const n="number"===typeof t?{x:t,y:e||0}:t;return this.getNodes().filter((t=>t.getBBox().containsPoint(n)))}getNodesInArea(t,e,n,i,s){const r="number"===typeof t?new Ly(t,e,n,i):Ly.create(t),o="number"===typeof t?s:e,a=o&&o.strict;return this.getNodes().filter((t=>{const e=t.getBBox();return a?r.containsRect(e):r.isIntersectWithRect(e)}))}getEdgesInArea(t,e,n,i,s){const r="number"===typeof t?new Ly(t,e,n,i):Ly.create(t),o="number"===typeof t?s:e,a=o&&o.strict;return this.getEdges().filter((t=>{const e=t.getBBox();return 0===e.width?e.inflate(1,0):0===e.height&&e.inflate(0,1),a?r.containsRect(e):r.isIntersectWithRect(e)}))}getNodesUnderNode(t,e={}){const n=t.getBBox(),i=null==e.by||"bbox"===e.by?this.getNodesInArea(n):this.getNodesFromPoint(n[e.by]);return i.filter((e=>t.id!==e.id&&!e.isDescendantOf(t)))}getAllCellsBBox(){return this.getCellsBBox(this.getCells())}getCellsBBox(t,e={}){return ZS.getCellsBBox(t,e)}search(t,e,n={}){n.breadthFirst?this.breadthFirstSearch(t,e,n):this.depthFirstSearch(t,e,n)}breadthFirstSearch(t,e,n={}){const i=[],s={},r={};i.push(t),r[t.id]=0;while(i.length>0){const t=i.shift();if(null==t||s[t.id])continue;if(s[t.id]=!0,!1===Em(e,this,t,r[t.id]))continue;const o=this.getNeighbors(t,n);o.forEach((e=>{r[e.id]=r[t.id]+1,i.push(e)}))}}depthFirstSearch(t,e,n={}){const i=[],s={},r={};i.push(t),r[t.id]=0;while(i.length>0){const t=i.pop();if(null==t||s[t.id])continue;if(s[t.id]=!0,!1===Em(e,this,t,r[t.id]))continue;const o=this.getNeighbors(t,n),a=i.length;o.forEach((e=>{r[e.id]=r[t.id]+1,i.splice(a,0,e)}))}}getShortestPath(t,e,n={}){const i={};this.getEdges().forEach((t=>{const e=t.getSourceCellId(),s=t.getTargetCellId();e&&s&&(i[e]||(i[e]=[]),i[s]||(i[s]=[]),i[e].push(s),n.directed||i[s].push(e))}));const s="string"===typeof t?t:t.id,r=fx.run(i,s,n.weight),o=[];let a="string"===typeof e?e:e.id;r[a]&&o.push(a);while(a=r[a])o.unshift(a);return o}translate(t,e,n){return this.getCells().filter((t=>!t.hasParent())).forEach((i=>i.translate(t,e,n))),this}resize(t,e,n){return this.resizeCells(t,e,this.getCells(),n)}resizeCells(t,e,n,i={}){const s=this.getCellsBBox(n);if(s){const r=Math.max(t/s.width,0),o=Math.max(e/s.height,0),a=s.getOrigin();n.forEach((t=>t.scale(r,o,a,i)))}return this}toJSON(t={}){return bA.toJSON(this.getCells(),t)}parseJSON(t){return bA.fromJSON(t)}fromJSON(t,e={}){const n=this.parseJSON(t);return this.resetCells(n,e),this}startBatch(t,e={}){return this.batches[t]=(this.batches[t]||0)+1,this.notify("batch:start",{name:t,data:e}),this}stopBatch(t,e={}){return this.batches[t]=(this.batches[t]||0)-1,this.notify("batch:stop",{name:t,data:e}),this}batchUpdate(t,e,n={}){this.startBatch(t,n);const i=e();return this.stopBatch(t,n),i}hasActiveBatch(t=Object.keys(this.batches)){const e=Array.isArray(t)?t:[t];return e.some((t=>this.batches[t]>0))}}(function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return(null==n||n===t.toStringTag)&&"function"===typeof i.addNode&&"function"===typeof i.addEdge&&null!=i.collection}t.toStringTag=`X6.${t.name}`,t.isModel=e})(bA||(bA={})),function(t){function e(t,e={}){return{cells:t.map((t=>t.toJSON(e)))}}function n(t){const e=[];return Array.isArray(t)?e.push(...t):(t.cells&&e.push(...t.cells),t.nodes&&t.nodes.forEach((t=>{null==t.shape&&(t.shape="rect"),e.push(t)})),t.edges&&t.edges.forEach((t=>{null==t.shape&&(t.shape="edge"),e.push(t)}))),e.map((t=>{const e=t.shape;if(e){if(tA.registry.exist(e))return tA.create(t);if(uA.registry.exist(e))return uA.create(t)}throw new Error("The `shape` should be specified when creating a node/edge instance")}))}t.toJSON=e,t.fromJSON=n}(bA||(bA={}));const vA=".text-block-content",CA=rA("text-block");class wA extends tA{get content(){return this.getContent()}set content(t){this.setContent(t)}getContent(){return this.store.get("content","")}setContent(t,e={}){this.store.set("content",t,e)}setup(){super.setup(),this.store.on("change:*",(t=>{const e=t.key;"content"===e?this.updateContent(this.getContent()):"size"===e&&this.updateSize(this.getSize())})),this.updateSize(this.getSize()),this.updateContent(this.getContent())}updateSize(t){w.SUPPORT_FOREIGNOBJECT&&this.setAttrs({foreignObject:Object.assign({},t),[vA]:{style:Object.assign({},t)}})}updateContent(t){w.SUPPORT_FOREIGNOBJECT?this.setAttrs({[vA]:{html:t?Zf(t):""}}):this.setAttrs({[vA]:{text:t}})}}(function(t){t.config({type:CA,view:CA,markup:['','',w.SUPPORT_FOREIGNOBJECT?["",'',`
`,"",""].join(""):``,""].join(""),attrs:{".":{fill:"#ffffff",stroke:"none"},rect:{fill:"#ffffff",stroke:"#000000",width:80,height:100},text:{fill:"#000000",fontSize:14,fontFamily:"Arial, helvetica, sans-serif"},body:{style:{background:"transparent",position:"static",margin:0,padding:0}},foreignObject:{style:{overflow:"hidden"}},[vA]:{refX:.5,refY:.5,yAlign:"middle",xAlign:"middle",style:{textAlign:"center",verticalAlign:"middle",display:"table-cell",padding:"0 5px",margin:0}}}}),tA.registry.register(CA,t)})(wA||(wA={})),function(t){const e="content";class n extends gA{confirmUpdate(t,n={}){let i=super.confirmUpdate(t,n);return this.hasAction(i,e)&&(this.updateContent(),i=this.removeAction(i,e)),i}update(t){if(w.SUPPORT_FOREIGNOBJECT)super.update(t);else{const e=this.cell,n=Object.assign({},t||e.getAttrs());delete n[vA],super.update(n),t&&!pl(t,vA)||this.updateContent(t)}}updateContent(t){if(w.SUPPORT_FOREIGNOBJECT)super.update(t);else{const e=this.cell,n=(t||e.getAttrs())[vA],i=pb(e.getContent(),e.getSize(),n,{svgDocument:this.graph.view.svg}),s={[vA]:kc({},n,{text:i})};super.update(s)}}}t.View=n,function(t){t.config({bootstrap:["render",e],actions:w.SUPPORT_FOREIGNOBJECT?{}:{size:e,content:e}}),gA.registry.register(CA,t)}(n=t.View||(t.View={}))}(wA||(wA={}));nA.define({shape:"empty"});function xA(t,e="body"){return[{tagName:t,selector:e},{tagName:"text",selector:"label"}]}function EA(t,e,n={}){const i={constructorName:t,markup:xA(t,n.selector),attrs:{[t]:Object.assign({},nA.bodyAttr)}},s=n.parent||nA;return s.define(kc(i,e,{shape:t}))}EA("rect",{attrs:{body:{refWidth:"100%",refHeight:"100%"}}}),tA.define({shape:"rect-headered",markup:[{tagName:"rect",selector:"body"},{tagName:"rect",selector:"header"},{tagName:"text",selector:"headerText"},{tagName:"text",selector:"bodyText"}],attrs:{body:Object.assign(Object.assign({},nA.bodyAttr),{refWidth:"100%",refHeight:"100%"}),header:Object.assign(Object.assign({},nA.bodyAttr),{refWidth:"100%",height:30,stroke:"#000000"}),headerText:Object.assign(Object.assign({},nA.labelAttr),{refX:"50%",refY:15,fontSize:16}),bodyText:Object.assign(Object.assign({},nA.labelAttr),{refY2:15})}}),EA("circle",{attrs:{body:{refCx:"50%",refCy:"50%",refR:"50%"}}});const SA=10;nA.define({shape:"cylinder",overwrite:!0,markup:[{tagName:"path",selector:"body"},{tagName:"ellipse",selector:"top"},{tagName:"text",selector:"label"}],attrs:{body:Object.assign(Object.assign({},nA.bodyAttr),{lateral:SA}),top:Object.assign(Object.assign({},nA.bodyAttr),{refCx:"50%",refRx:"50%",cy:SA,ry:SA})},attrHooks:{lateral:{set(t,{refBBox:e}){const n=om(t);n&&(t=parseFloat(t)/100);const i=e.x,s=e.y,r=e.width,o=e.height,a=r/2,l=n?o*t:t,c=.551784,h=c*a,u=c*l,d=i,p=i+r/2,g=i+r,f=s+l,m=f-l,y=s+o-l,b=s+o,v=["M",d,f,"L",d,y,"C",i,y+u,p-h,b,p,b,"C",p+h,b,g,y+u,g,y,"L",g,f,"C",g,f-u,p+h,m,p,m,"C",p-h,m,d,f-u,d,f,"Z"];return{d:v.join(" ")}}}},knob:{enabled:!0,position({node:t}){const e=t.attr("body/lateral");return{x:0,y:e}},onMouseMove({node:t,data:e,deltaY:n}){if(0!==n){const i=t.getBBox(),s=t.attr("body/lateral");null==e.round&&(e.round=s);const r=0,o=i.height/2,a=sm(e.round+n,r,o);a!==s&&t.attr({body:{lateral:a},top:{cy:a,ry:a}})}}}}),EA("ellipse",{attrs:{body:{refCx:"50%",refCy:"50%",refRx:"50%",refRy:"50%"}}});var AA=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);sArray.isArray(t)?t.join(","):jy.isPointLike(t)?`${t.x}, ${t.y}`:"")).join(" ")}t.pointsToString=e,t.config({propHooks(t){const{points:n}=t,i=AA(t,["points"]);if(n){const t=e(n);t&&qu(i,"attrs/body/refPoints",t)}return i}})})(MA||(MA={}));EA("polygon",{},{parent:MA}),EA("polyline",{},{parent:MA});var kA=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{const t=this.graph.hook.shouldUpdateHTMLComponent(this.cell);t&&this.renderHTMLComponent()}))}confirmUpdate(t){const n=super.confirmUpdate(t);return this.handleAction(n,e.action,(()=>this.renderHTMLComponent()))}renderHTMLComponent(){const t=this.selectors.foContent;if(t){const e=this.$(t).empty(),n=this.graph.hook.getHTMLComponent(this.cell);n&&("string"===typeof n?e.html(n):e.append(n))}}}t.View=e,function(t){t.action="html",t.config({bootstrap:[t.action],actions:{html:t.action}}),gA.registry.register("html-view",t)}(e=t.View||(t.View={}))})(TA||(TA={})),function(t){t.config({view:"html-view",markup:[{tagName:"rect",selector:"body"},Object.assign({},Nx.getForeignObjectMarkup()),{tagName:"text",selector:"label"}],attrs:{body:{fill:"none",stroke:"none",refWidth:"100%",refHeight:"100%"},fo:{refWidth:"100%",refHeight:"100%"}}}),tA.registry.register("html",t)}(TA||(TA={})),function(t){t.componentRegistry=yv.create({type:"html componnet"})}(TA||(TA={}));var DA=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class NA extends gx{constructor(t){super(),this.delay=10,this.throttle=2,this.threshold=5,this.changeCount=0,this.timestamp=0,this.options=Object.assign(Object.assign({},NA.defaultOptions),t),this.graph.model.on("cell:change:*",this.onModelChanged,this)}get graph(){return this.options.graph}onModelChanged(){if(this.disabled)return;const t=(new Date).getTime(),e=(t-this.timestamp)/1e3;e>this.delay||this.changeCount>=this.threshold&&e>this.throttle?(this.save(),this.reset()):this.changeCount+=1}save(){this.trigger("save")}reset(){this.changeCount=0,this.timestamp=(new Date).getTime()}dispose(){this.graph.model.off("cell:change:*",this.onModelChanged,this)}}DA([gx.dispose()],NA.prototype,"dispose",null),function(t){t.defaultOptions={delay:10,throttle:2,threshold:5}}(NA||(NA={}));class jA extends ux{constructor(t){super(),this.graph=t,this.init()}get options(){return this.graph.options}get model(){return this.graph.model}get view(){return this.graph.view}init(){}}var LA,FA=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class BA extends Ex{constructor(t){super(),this.graph=t;const{selectors:e,fragment:n}=Nx.parseJSONMarkup(BA.markup);this.background=e.background,this.grid=e.grid,this.svg=e.svg,this.defs=e.defs,this.viewport=e.viewport,this.primer=e.primer,this.stage=e.stage,this.decorator=e.decorator,this.overlay=e.overlay,this.container=this.options.container,this.restore=BA.snapshoot(this.container),this.$(this.container).addClass(this.prefixClassName("graph")).append(n),this.delegateEvents()}get model(){return this.graph.model}get options(){return this.graph.options}delegateEvents(){const t=this.constructor;return super.delegateEvents(t.events),this}guard(t,e){return"mousedown"===t.type&&2===t.button||(!(!this.options.guard||!this.options.guard(t,e))||(t.data&&void 0!==t.data.guarded?t.data.guarded:!(e&&e.cell&&ZS.isCell(e.cell))&&(this.svg!==t.target&&this.container!==t.target&&!v().contains(this.svg,t.target))))}findView(t){return this.graph.renderer.findViewByElem(t)}onDblClick(t){this.options.preventDefaultDblClick&&t.preventDefault();const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const i=this.graph.snapToGrid(e.clientX,e.clientY);n?n.onDblClick(e,i.x,i.y):this.graph.trigger("blank:dblclick",{e:e,x:i.x,y:i.y})}onClick(t){if(this.getMouseMovedCount(t)<=this.options.clickThreshold){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const i=this.graph.snapToGrid(e.clientX,e.clientY);n?n.onClick(e,i.x,i.y):this.graph.trigger("blank:click",{e:e,x:i.x,y:i.y})}}onContextMenu(t){this.options.preventDefaultContextMenu&&t.preventDefault();const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const i=this.graph.snapToGrid(e.clientX,e.clientY);n?n.onContextMenu(e,i.x,i.y):this.graph.trigger("blank:contextmenu",{e:e,x:i.x,y:i.y})}delegateDragEvents(t,e){null==t.data&&(t.data={}),this.setEventData(t,{currentView:e||null,mouseMovedCount:0,startPosition:{x:t.clientX,y:t.clientY}});const n=this.constructor;this.delegateDocumentEvents(n.documentEvents,t.data),this.undelegateEvents()}getMouseMovedCount(t){const e=this.getEventData(t);return e.mouseMovedCount||0}onMouseDown(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;this.options.preventDefaultMouseDown&&e.preventDefault();const i=this.graph.snapToGrid(e.clientX,e.clientY);n?n.onMouseDown(e,i.x,i.y):(this.options.preventDefaultBlankAction&&e.preventDefault(),this.graph.trigger("blank:mousedown",{e:e,x:i.x,y:i.y})),this.delegateDragEvents(e,n)}onMouseMove(t){const e=this.getEventData(t),n=e.startPosition;if(n&&n.x===t.clientX&&n.y===t.clientY)return;null==e.mouseMovedCount&&(e.mouseMovedCount=0),e.mouseMovedCount+=1;const i=e.mouseMovedCount;if(i<=this.options.moveThreshold)return;const s=this.normalizeEvent(t),r=this.graph.snapToGrid(s.clientX,s.clientY),o=e.currentView;o?o.onMouseMove(s,r.x,r.y):this.graph.trigger("blank:mousemove",{e:s,x:r.x,y:r.y}),this.setEventData(s,e)}onMouseUp(t){this.undelegateDocumentEvents();const e=this.normalizeEvent(t),n=this.graph.snapToGrid(e.clientX,e.clientY),i=this.getEventData(t),s=i.currentView;s?s.onMouseUp(e,n.x,n.y):this.graph.trigger("blank:mouseup",{e:e,x:n.x,y:n.y}),t.isPropagationStopped()||this.onClick(v().Event(t,{type:"click",data:t.data})),t.stopImmediatePropagation(),this.delegateEvents()}onMouseOver(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(!this.guard(e,n))if(n)n.onMouseOver(e);else{if(this.container===e.target)return;this.graph.trigger("blank:mouseover",{e:e})}}onMouseOut(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(!this.guard(e,n))if(n)n.onMouseOut(e);else{if(this.container===e.target)return;this.graph.trigger("blank:mouseout",{e:e})}}onMouseEnter(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const i=this.graph.renderer.findViewByElem(e.relatedTarget);if(n){if(i===n)return;n.onMouseEnter(e)}else{if(i)return;this.graph.trigger("graph:mouseenter",{e:e})}}onMouseLeave(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const i=this.graph.renderer.findViewByElem(e.relatedTarget);if(n){if(i===n)return;n.onMouseLeave(e)}else{if(i)return;this.graph.trigger("graph:mouseleave",{e:e})}}onMouseWheel(t){const e=this.normalizeEvent(t),n=this.findView(e.target);if(this.guard(e,n))return;const i=e.originalEvent,s=this.graph.snapToGrid(i.clientX,i.clientY),r=Math.max(-1,Math.min(1,i.wheelDelta||-i.detail));n?n.onMouseWheel(e,s.x,s.y,r):this.graph.trigger("blank:mousewheel",{e:e,delta:r,x:s.x,y:s.y})}onCustomEvent(t){const e=t.currentTarget,n=e.getAttribute("event")||e.getAttribute("data-event");if(n){const i=this.findView(e);if(i){const e=this.normalizeEvent(t);if(this.guard(e,i))return;const s=this.graph.snapToGrid(e.clientX,e.clientY);i.onCustomEvent(e,n,s.x,s.y)}}}handleMagnetEvent(t,e){const n=t.currentTarget,i=n.getAttribute("magnet");if(i&&"false"!==i.toLowerCase()){const i=this.findView(n);if(i){const s=this.normalizeEvent(t);if(this.guard(s,i))return;const r=this.graph.snapToGrid(s.clientX,s.clientY);Em(e,this.graph,i,s,n,r.x,r.y)}}}onMagnetMouseDown(t){this.handleMagnetEvent(t,((t,e,n,i,s)=>{t.onMagnetMouseDown(e,n,i,s)}))}onMagnetDblClick(t){this.handleMagnetEvent(t,((t,e,n,i,s)=>{t.onMagnetDblClick(e,n,i,s)}))}onMagnetContextMenu(t){this.options.preventDefaultContextMenu&&t.preventDefault(),this.handleMagnetEvent(t,((t,e,n,i,s)=>{t.onMagnetContextMenu(e,n,i,s)}))}onLabelMouseDown(t){const e=t.currentTarget,n=this.findView(e);if(n){const e=this.normalizeEvent(t);if(this.guard(e,n))return;const i=this.graph.snapToGrid(e.clientX,e.clientY);n.onLabelMouseDown(e,i.x,i.y)}}onImageDragStart(){return!1}dispose(){this.undelegateEvents(),this.undelegateDocumentEvents(),this.restore(),this.restore=()=>{}}}FA([Ex.dispose()],BA.prototype,"dispose",null),function(t){const e=`${Cw.prefixCls}-graph`;function n(t){const e=t.cloneNode();return t.childNodes.forEach((t=>e.appendChild(t))),()=>{ty(t);while(t.attributes.length>0)t.removeAttribute(t.attributes[0].name);for(let n=0,i=e.attributes.length;nt.appendChild(e)))}}t.markup=[{ns:Im.xhtml,tagName:"div",selector:"background",className:`${e}-background`},{ns:Im.xhtml,tagName:"div",selector:"grid",className:`${e}-grid`},{ns:Im.svg,tagName:"svg",selector:"svg",className:`${e}-svg`,attrs:{width:"100%",height:"100%","xmlns:xlink":Im.xlink},children:[{tagName:"defs",selector:"defs"},{tagName:"g",selector:"viewport",className:`${e}-svg-viewport`,children:[{tagName:"g",selector:"primer",className:`${e}-svg-primer`},{tagName:"g",selector:"stage",className:`${e}-svg-stage`},{tagName:"g",selector:"decorator",className:`${e}-svg-decorator`},{tagName:"g",selector:"overlay",className:`${e}-svg-overlay`}]}]}],t.snapshoot=n}(BA||(BA={})),function(t){const e=Cw.prefixCls;t.events={dblclick:"onDblClick",contextmenu:"onContextMenu",touchstart:"onMouseDown",mousedown:"onMouseDown",mouseover:"onMouseOver",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousewheel:"onMouseWheel",DOMMouseScroll:"onMouseWheel",[`mouseenter .${e}-cell`]:"onMouseEnter",[`mouseleave .${e}-cell`]:"onMouseLeave",[`mouseenter .${e}-cell-tools`]:"onMouseEnter",[`mouseleave .${e}-cell-tools`]:"onMouseLeave",[`mousedown .${e}-cell [event]`]:"onCustomEvent",[`touchstart .${e}-cell [event]`]:"onCustomEvent",[`mousedown .${e}-cell [data-event]`]:"onCustomEvent",[`touchstart .${e}-cell [data-event]`]:"onCustomEvent",[`dblclick .${e}-cell [magnet]`]:"onMagnetDblClick",[`contextmenu .${e}-cell [magnet]`]:"onMagnetContextMenu",[`mousedown .${e}-cell [magnet]`]:"onMagnetMouseDown",[`touchstart .${e}-cell [magnet]`]:"onMagnetMouseDown",[`dblclick .${e}-cell [data-magnet]`]:"onMagnetDblClick",[`contextmenu .${e}-cell [data-magnet]`]:"onMagnetContextMenu",[`mousedown .${e}-cell [data-magnet]`]:"onMagnetMouseDown",[`touchstart .${e}-cell [data-magnet]`]:"onMagnetMouseDown",[`dragstart .${e}-cell image`]:"onImageDragStart",[`mousedown .${e}-edge .${e}-edge-label`]:"onLabelMouseDown",[`touchstart .${e}-edge .${e}-edge-label`]:"onLabelMouseDown"},t.documentEvents={mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"}}(BA||(BA={})),function(t){function e(t,e){return(n,i,s)=>{const r=s.value;s.value=function(...n){const s=this.scroller.widget;if(null==s){const n=`Shoule enable scroller to use method '${i}'`;if(!1!==t)throw console.error(n),new Error(n);return!1!==e&&console.warn(n),this}return r.call(this,...n)}}}t.checkScroller=e}(LA||(LA={}));const RA=".x6-graph {\n position: relative;\n outline: none;\n}\n.x6-graph-background,\n.x6-graph-grid,\n.x6-graph-svg {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n.x6-graph-background-stage,\n.x6-graph-grid-stage,\n.x6-graph-svg-stage {\n user-select: none;\n}\n.x6-graph.x6-graph-pannable {\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n.x6-graph.x6-graph-panning {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n}\n.x6-node {\n cursor: move;\n /* stylelint-disable-next-line */\n}\n.x6-node.x6-node-immovable {\n cursor: default;\n}\n.x6-node * {\n -webkit-user-drag: none;\n}\n.x6-node .scalable * {\n vector-effect: non-scaling-stroke;\n}\n.x6-node [magnet='true'] {\n cursor: crosshair;\n transition: opacity 0.3s;\n}\n.x6-node [magnet='true']:hover {\n opacity: 0.7;\n}\n.x6-node foreignObject {\n display: block;\n overflow: visible;\n background-color: transparent;\n}\n.x6-node foreignObject > body {\n position: static;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n overflow: visible;\n background-color: transparent;\n}\n.x6-edge .source-marker,\n.x6-edge .target-marker {\n vector-effect: non-scaling-stroke;\n}\n.x6-edge .connection {\n stroke-linejoin: round;\n fill: none;\n}\n.x6-edge .connection-wrap {\n cursor: move;\n opacity: 0;\n fill: none;\n stroke: #000;\n stroke-width: 15;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.x6-edge .connection-wrap:hover {\n opacity: 0.4;\n stroke-opacity: 0.4;\n}\n.x6-edge .vertices {\n cursor: move;\n opacity: 0;\n}\n.x6-edge .vertices .vertex {\n fill: #1abc9c;\n}\n.x6-edge .vertices .vertex :hover {\n fill: #34495e;\n stroke: none;\n}\n.x6-edge .vertices .vertex-remove {\n cursor: pointer;\n fill: #fff;\n}\n.x6-edge .vertices .vertex-remove-area {\n cursor: pointer;\n opacity: 0.1;\n}\n.x6-edge .vertices .vertex-group:hover .vertex-remove-area {\n opacity: 1;\n}\n.x6-edge .arrowheads {\n cursor: move;\n opacity: 0;\n}\n.x6-edge .arrowheads .arrowhead {\n fill: #1abc9c;\n}\n.x6-edge .arrowheads .arrowhead :hover {\n fill: #f39c12;\n stroke: none;\n}\n.x6-edge .tools {\n cursor: pointer;\n opacity: 0;\n}\n.x6-edge .tools .tool-options {\n display: none;\n}\n.x6-edge .tools .tool-remove circle {\n fill: #f00;\n}\n.x6-edge .tools .tool-remove path {\n fill: #fff;\n}\n.x6-edge:hover .vertices,\n.x6-edge:hover .arrowheads,\n.x6-edge:hover .tools {\n opacity: 1;\n}\n.x6-highlight-opacity {\n opacity: 0.3;\n}\n@keyframes halo-pie-visibility {\n 0% {\n visibility: hidden;\n }\n 100% {\n visibility: visible;\n }\n}\n@keyframes halo-pie-opening {\n 0% {\n transform: scale(0.4) rotate(-20deg);\n }\n 100% {\n transform: scale(1) rotate(0);\n }\n}\n.x6-widget-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: 0 0;\n background-size: 20px 20px;\n cursor: pointer;\n user-select: none;\n pointer-events: auto;\n -webkit-user-drag: none;\n user-drag: none;\n /* stylelint-disable-line */\n}\n.x6-widget-handle.hidden {\n display: none;\n}\n.x6-widget-handle-selected {\n background-color: rgba(0, 0, 0, 0.1);\n border-radius: 3px;\n}\n.x6-widget-handle-remove {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2218.75px%22%20height%3D%2218.75px%22%20viewBox%3D%220%200%2018.75%2018.75%22%20enable-background%3D%22new%200%200%2018.75%2018.75%22%20xml%3Aspace%3D%22preserve%22%3E%3Cg%3E%3Cpath%20fill%3D%22%236A6C8A%22%20d%3D%22M15.386%2C3.365c-3.315-3.314-8.707-3.313-12.021%2C0c-3.314%2C3.315-3.314%2C8.706%2C0%2C12.02%20c3.314%2C3.314%2C8.707%2C3.314%2C12.021%2C0S18.699%2C6.68%2C15.386%2C3.365L15.386%2C3.365z%20M4.152%2C14.598C1.273%2C11.719%2C1.273%2C7.035%2C4.153%2C4.154%20c2.88-2.88%2C7.563-2.88%2C10.443%2C0c2.881%2C2.88%2C2.881%2C7.562%2C0%2C10.443C11.716%2C17.477%2C7.032%2C17.477%2C4.152%2C14.598L4.152%2C14.598z%22%2F%3E%3Cpath%20fill%3D%22%236A6C8A%22%20d%3D%22M12.157%2C11.371L7.38%2C6.593C7.162%2C6.375%2C6.809%2C6.375%2C6.592%2C6.592c-0.218%2C0.219-0.218%2C0.572%2C0%2C0.79%20l4.776%2C4.776c0.218%2C0.219%2C0.571%2C0.219%2C0.79%2C0C12.375%2C11.941%2C12.375%2C11.588%2C12.157%2C11.371L12.157%2C11.371z%22%2F%3E%3Cpath%20fill%3D%22%236A6C8A%22%20d%3D%22M11.369%2C6.593l-4.777%2C4.778c-0.217%2C0.217-0.217%2C0.568%2C0%2C0.787c0.219%2C0.219%2C0.571%2C0.217%2C0.788%2C0l4.777-4.777%20c0.218-0.218%2C0.218-0.571%2C0.001-0.789C11.939%2C6.375%2C11.587%2C6.375%2C11.369%2C6.593L11.369%2C6.593z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%20');\n cursor: pointer;\n}\n.x6-widget-handle-remove:hover {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2218.75px%22%20height%3D%2218.75px%22%20viewBox%3D%220%200%2018.75%2018.75%22%20enable-background%3D%22new%200%200%2018.75%2018.75%22%20xml%3Aspace%3D%22preserve%22%3E%3Cg%3E%3Cpath%20fill%3D%22%236A6C8A%22%20d%3D%22M15.386%2C3.365c-3.315-3.314-8.707-3.313-12.021%2C0c-3.314%2C3.315-3.314%2C8.706%2C0%2C12.02%20c3.314%2C3.314%2C8.707%2C3.314%2C12.021%2C0S18.699%2C6.68%2C15.386%2C3.365L15.386%2C3.365z%22%2F%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M12.157%2C11.371L7.38%2C6.593C7.162%2C6.375%2C6.809%2C6.375%2C6.592%2C6.592c-0.218%2C0.219-0.218%2C0.572%2C0%2C0.79%20l4.776%2C4.776c0.218%2C0.219%2C0.571%2C0.219%2C0.79%2C0C12.375%2C11.941%2C12.375%2C11.588%2C12.157%2C11.371L12.157%2C11.371z%22%2F%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M11.369%2C6.593l-4.777%2C4.778c-0.217%2C0.217-0.217%2C0.568%2C0%2C0.787c0.219%2C0.219%2C0.571%2C0.217%2C0.788%2C0l4.777-4.777%20c0.218-0.218%2C0.218-0.571%2C0.001-0.789C11.939%2C6.375%2C11.587%2C6.375%2C11.369%2C6.593L11.369%2C6.593z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%20');\n}\n.x6-widget-handle-rotate {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2218.75px%22%20height%3D%2218.75px%22%20viewBox%3D%220%200%2018.75%2018.75%22%20enable-background%3D%22new%200%200%2018.75%2018.75%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%236A6C8A%22%20d%3D%22M9.374%2C17.592c-4.176%2C0-7.57-3.401-7.57-7.575c0-4.175%2C3.395-7.574%2C7.57-7.574c0.28%2C0%2C0.56%2C0.018%2C0.837%2C0.05%20V1.268c0-0.158%2C0.099-0.3%2C0.239-0.36c0.151-0.058%2C0.315-0.026%2C0.428%2C0.086l2.683%2C2.688c0.152%2C0.154%2C0.152%2C0.399%2C0%2C0.553l-2.68%2C2.693%20c-0.115%2C0.112-0.279%2C0.147-0.431%2C0.087c-0.141-0.063-0.239-0.205-0.239-0.361V5.296C9.934%2C5.243%2C9.654%2C5.22%2C9.374%2C5.22%20c-2.646%2C0-4.796%2C2.152-4.796%2C4.797s2.154%2C4.798%2C4.796%2C4.798c2.645%2C0%2C4.798-2.153%2C4.798-4.798c0-0.214%2C0.174-0.391%2C0.391-0.391h1.991%20c0.217%2C0%2C0.394%2C0.177%2C0.394%2C0.391C16.947%2C14.19%2C13.549%2C17.592%2C9.374%2C17.592L9.374%2C17.592z%20M9.374%2C17.592%22%2F%3E%3C%2Fsvg%3E%20');\n cursor: move;\n}\n.x6-widget-handle-rotate:hover {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2218.75px%22%20height%3D%2218.75px%22%20viewBox%3D%220%200%2018.75%2018.75%22%20enable-background%3D%22new%200%200%2018.75%2018.75%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23FD6EB6%22%20d%3D%22M9.374%2C17.592c-4.176%2C0-7.57-3.401-7.57-7.575c0-4.175%2C3.395-7.574%2C7.57-7.574c0.28%2C0%2C0.56%2C0.018%2C0.837%2C0.05%20V1.268c0-0.158%2C0.099-0.3%2C0.239-0.36c0.151-0.058%2C0.315-0.026%2C0.428%2C0.086l2.683%2C2.688c0.152%2C0.154%2C0.152%2C0.399%2C0%2C0.553l-2.68%2C2.693%20c-0.115%2C0.112-0.279%2C0.147-0.431%2C0.087c-0.141-0.063-0.239-0.205-0.239-0.361V5.296C9.934%2C5.243%2C9.654%2C5.22%2C9.374%2C5.22%20c-2.646%2C0-4.796%2C2.152-4.796%2C4.797s2.154%2C4.798%2C4.796%2C4.798c2.645%2C0%2C4.798-2.153%2C4.798-4.798c0-0.214%2C0.174-0.391%2C0.391-0.391h1.991%20c0.217%2C0%2C0.394%2C0.177%2C0.394%2C0.391C16.947%2C14.19%2C13.549%2C17.592%2C9.374%2C17.592L9.374%2C17.592z%20M9.374%2C17.592%22%2F%3E%3C%2Fsvg%3E%20');\n}\n.x6-widget-handle-resize {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3Csvg%20height%3D%2224px%22%20version%3D%221.1%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2224px%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Asketch%3D%22http%3A%2F%2Fwww.bohemiancoding.com%2Fsketch%2Fns%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Ctitle%2F%3E%3Cdesc%2F%3E%3Cdefs%2F%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20id%3D%22miu%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%3E%3Cg%20id%3D%22Artboard-1%22%20transform%3D%22translate(-251.000000%2C%20-443.000000)%22%3E%3Cg%20id%3D%22slice%22%20transform%3D%22translate(215.000000%2C%20119.000000)%22%2F%3E%3Cpath%20d%3D%22M252%2C448%20L256%2C448%20L256%2C444%20L252%2C444%20L252%2C448%20Z%20M257%2C448%20L269%2C448%20L269%2C446%20L257%2C446%20L257%2C448%20Z%20M257%2C464%20L269%2C464%20L269%2C462%20L257%2C462%20L257%2C464%20Z%20M270%2C444%20L270%2C448%20L274%2C448%20L274%2C444%20L270%2C444%20Z%20M252%2C462%20L252%2C466%20L256%2C466%20L256%2C462%20L252%2C462%20Z%20M270%2C462%20L270%2C466%20L274%2C466%20L274%2C462%20L270%2C462%20Z%20M254%2C461%20L256%2C461%20L256%2C449%20L254%2C449%20L254%2C461%20Z%20M270%2C461%20L272%2C461%20L272%2C449%20L270%2C449%20L270%2C461%20Z%22%20fill%3D%22%236A6C8A%22%20id%3D%22editor-crop-glyph%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E');\n cursor: se-resize;\n}\n.x6-widget-handle-resize:hover {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3Csvg%20height%3D%2224px%22%20version%3D%221.1%22%20viewBox%3D%220%200%2024%2024%22%20width%3D%2224px%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Asketch%3D%22http%3A%2F%2Fwww.bohemiancoding.com%2Fsketch%2Fns%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Ctitle%2F%3E%3Cdesc%2F%3E%3Cdefs%2F%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%20id%3D%22miu%22%20stroke%3D%22none%22%20stroke-width%3D%221%22%3E%3Cg%20id%3D%22Artboard-1%22%20transform%3D%22translate(-251.000000%2C%20-443.000000)%22%3E%3Cg%20id%3D%22slice%22%20transform%3D%22translate(215.000000%2C%20119.000000)%22%2F%3E%3Cpath%20d%3D%22M252%2C448%20L256%2C448%20L256%2C444%20L252%2C444%20L252%2C448%20Z%20M257%2C448%20L269%2C448%20L269%2C446%20L257%2C446%20L257%2C448%20Z%20M257%2C464%20L269%2C464%20L269%2C462%20L257%2C462%20L257%2C464%20Z%20M270%2C444%20L270%2C448%20L274%2C448%20L274%2C444%20L270%2C444%20Z%20M252%2C462%20L252%2C466%20L256%2C466%20L256%2C462%20L252%2C462%20Z%20M270%2C462%20L270%2C466%20L274%2C466%20L274%2C462%20L270%2C462%20Z%20M254%2C461%20L256%2C461%20L256%2C449%20L254%2C449%20L254%2C461%20Z%20M270%2C461%20L272%2C461%20L272%2C449%20L270%2C449%20L270%2C461%20Z%22%20fill%3D%22%23FD6EB6%22%20id%3D%22editor-crop-glyph%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E');\n}\n.x6-widget-handle-clone {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2218.75px%22%20height%3D%2218.75px%22%20viewBox%3D%220%200%2018.75%2018.75%22%20enable-background%3D%22new%200%200%2018.75%2018.75%22%20xml%3Aspace%3D%22preserve%22%3E%3Cg%3E%3Cpath%20fill%3D%22%236A6C8A%22%20d%3D%22M12.852%2C0.875h-9.27c-0.853%2C0-1.547%2C0.694-1.547%2C1.547v10.816h1.547V2.422h9.27V0.875z%20M15.172%2C3.965h-8.5%20c-0.849%2C0-1.547%2C0.698-1.547%2C1.547v10.816c0%2C0.849%2C0.698%2C1.547%2C1.547%2C1.547h8.5c0.85%2C0%2C1.543-0.698%2C1.543-1.547V5.512%20C16.715%2C4.663%2C16.021%2C3.965%2C15.172%2C3.965L15.172%2C3.965z%20M15.172%2C16.328h-8.5V5.512h8.5V16.328z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%20');\n cursor: move;\n}\n.x6-widget-handle-clone:hover {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2218.75px%22%20height%3D%2218.75px%22%20viewBox%3D%220%200%2018.75%2018.75%22%20enable-background%3D%22new%200%200%2018.75%2018.75%22%20xml%3Aspace%3D%22preserve%22%3E%3Cg%3E%3Cpath%20fill%3D%22%23FD6EB6%22%20d%3D%22M12.852%2C0.875h-9.27c-0.853%2C0-1.547%2C0.694-1.547%2C1.547v10.816h1.547V2.422h9.27V0.875z%20M15.172%2C3.965h-8.5%20c-0.849%2C0-1.547%2C0.698-1.547%2C1.547v10.816c0%2C0.849%2C0.698%2C1.547%2C1.547%2C1.547h8.5c0.849%2C0%2C1.543-0.698%2C1.543-1.547V5.512%20C16.715%2C4.663%2C16.021%2C3.965%2C15.172%2C3.965L15.172%2C3.965z%20M15.172%2C16.328h-8.5V5.512h8.5V16.328z%20M15.172%2C16.328%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E%20');\n}\n.x6-widget-handle-link {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2218.75px%22%20height%3D%2218.75px%22%20viewBox%3D%220%200%2018.75%2018.75%22%20enable-background%3D%22new%200%200%2018.75%2018.75%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%236A6C8A%22%20d%3D%22M9.884%2C9.838c0.54-0.551%2C1.005-0.955%2C1.384-1.201c0.463-0.308%2C0.749-0.352%2C0.887-0.352h1.34v1.367%20c0%2C0.104%2C0.061%2C0.2%2C0.154%2C0.242s0.204%2C0.027%2C0.284-0.038l3.168-2.669c0.06-0.051%2C0.096-0.125%2C0.096-0.203S17.16%2C6.83%2C17.101%2C6.781%20l-3.168-2.677c-0.08-0.067-0.19-0.081-0.284-0.038c-0.094%2C0.045-0.154%2C0.139-0.154%2C0.242v1.414h-1.343%20c-1.24%2C0.014-2.215%2C0.67-2.927%2C1.242c-0.797%2C0.65-1.533%2C1.447-2.245%2C2.217c-0.361%2C0.391-0.7%2C0.759-1.044%2C1.1%20c-0.541%2C0.549-1.011%2C0.951-1.395%2C1.199c-0.354%2C0.231-0.678%2C0.357-0.921%2C0.357h-1.8c-0.146%2C0-0.266%2C0.12-0.266%2C0.265v2.029%20c0%2C0.148%2C0.12%2C0.268%2C0.266%2C0.268h1.8l0%2C0c1.255-0.014%2C2.239-0.667%2C2.958-1.24c0.82-0.661%2C1.572-1.475%2C2.297-2.256%20C9.225%2C10.524%2C9.555%2C10.169%2C9.884%2C9.838z%22%2F%3E%3C%2Fsvg%3E%20');\n cursor: move;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}\n.x6-widget-handle-link:hover {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2218.75px%22%20height%3D%2218.75px%22%20viewBox%3D%220%200%2018.75%2018.75%22%20enable-background%3D%22new%200%200%2018.75%2018.75%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23FD6EB6%22%20d%3D%22M9.884%2C9.838c0.54-0.551%2C1.005-0.955%2C1.384-1.201c0.463-0.308%2C0.749-0.352%2C0.887-0.352h1.34v1.367%20c0%2C0.104%2C0.061%2C0.2%2C0.154%2C0.242s0.204%2C0.027%2C0.284-0.038l3.168-2.669c0.06-0.051%2C0.096-0.125%2C0.096-0.203S17.16%2C6.83%2C17.101%2C6.781%20l-3.168-2.677c-0.08-0.067-0.19-0.081-0.284-0.038c-0.094%2C0.045-0.154%2C0.139-0.154%2C0.242v1.414h-1.343%20c-1.24%2C0.014-2.215%2C0.67-2.927%2C1.242c-0.797%2C0.65-1.533%2C1.447-2.245%2C2.217c-0.361%2C0.391-0.7%2C0.759-1.044%2C1.1%20c-0.541%2C0.549-1.011%2C0.951-1.395%2C1.199c-0.354%2C0.231-0.678%2C0.357-0.921%2C0.357h-1.8c-0.146%2C0-0.266%2C0.12-0.266%2C0.265v2.029%20c0%2C0.148%2C0.12%2C0.268%2C0.266%2C0.268h1.8l0%2C0c1.255-0.014%2C2.239-0.667%2C2.958-1.24c0.82-0.661%2C1.572-1.475%2C2.297-2.256%20C9.225%2C10.524%2C9.555%2C10.169%2C9.884%2C9.838z%22%2F%3E%3C%2Fsvg%3E%20');\n}\n.x6-widget-handle-fork {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2218.75px%22%20height%3D%2218.75px%22%20viewBox%3D%220%200%2018.75%2018.75%22%20enable-background%3D%22new%200%200%2018.75%2018.75%22%20xml%3Aspace%3D%22preserve%22%3E%3Cg%3E%3Cg%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20fill%3D%22%236A6C8A%22%20d%3D%22M13.307%2C11.593c-0.69%2C0-1.299%2C0.33-1.693%2C0.835l-4.136-2.387%20C7.552%2C9.82%2C7.602%2C9.589%2C7.602%2C9.344c0-0.25-0.051-0.487-0.129-0.71l4.097-2.364c0.393%2C0.536%2C1.022%2C0.888%2C1.737%2C0.888%20c1.193%2C0%2C2.16-0.967%2C2.16-2.159s-0.967-2.159-2.16-2.159c-1.191%2C0-2.158%2C0.967-2.158%2C2.159c0%2C0.076%2C0.014%2C0.149%2C0.021%2C0.223%20L6.848%2C7.716C6.469%2C7.39%2C5.982%2C7.185%2C5.442%2C7.185c-1.191%2C0-2.158%2C0.967-2.158%2C2.159s0.967%2C2.159%2C2.158%2C2.159%20c0.545%2C0%2C1.037-0.208%2C1.417-0.541l4.319%2C2.493c-0.014%2C0.098-0.029%2C0.194-0.029%2C0.296c0%2C1.193%2C0.967%2C2.159%2C2.158%2C2.159%20c1.193%2C0%2C2.16-0.966%2C2.16-2.159C15.467%2C12.559%2C14.5%2C11.593%2C13.307%2C11.593z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E%20');\n cursor: move;\n}\n.x6-widget-handle-fork:hover {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2218.75px%22%20height%3D%2218.75px%22%20viewBox%3D%220%200%2018.75%2018.75%22%20enable-background%3D%22new%200%200%2018.75%2018.75%22%20xml%3Aspace%3D%22preserve%22%3E%3Cg%3E%3Cg%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20fill%3D%22%23FD6EB6%22%20d%3D%22M13.307%2C11.593c-0.69%2C0-1.299%2C0.33-1.693%2C0.835l-4.136-2.387%20c0.075-0.22%2C0.125-0.452%2C0.125-0.697c0-0.25-0.051-0.487-0.129-0.71l4.097-2.365c0.394%2C0.536%2C1.022%2C0.888%2C1.737%2C0.888%20c1.193%2C0%2C2.16-0.967%2C2.16-2.159s-0.967-2.159-2.16-2.159c-1.191%2C0-2.158%2C0.967-2.158%2C2.159c0%2C0.076%2C0.015%2C0.148%2C0.022%2C0.223%20L6.848%2C7.716C6.469%2C7.39%2C5.981%2C7.185%2C5.442%2C7.185c-1.191%2C0-2.158%2C0.967-2.158%2C2.159s0.967%2C2.159%2C2.158%2C2.159%20c0.545%2C0%2C1.037-0.208%2C1.417-0.541l4.319%2C2.493c-0.013%2C0.098-0.029%2C0.194-0.029%2C0.296c0%2C1.193%2C0.967%2C2.159%2C2.158%2C2.159%20c1.193%2C0%2C2.16-0.966%2C2.16-2.159C15.467%2C12.559%2C14.5%2C11.593%2C13.307%2C11.593z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E%20');\n}\n.x6-widget-handle-unlink {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2218.75px%22%20height%3D%2218.75px%22%20viewBox%3D%220%200%2018.75%2018.75%22%20enable-background%3D%22new%200%200%2018.75%2018.75%22%20xml%3Aspace%3D%22preserve%22%3E%3Cg%3E%3Cg%3E%3Cpath%20fill%3D%22%236A6C8A%22%20d%3D%22M12.285%2C9.711l-2.104-0.302L9.243%2C8.568L6.669%2C7.095C6.948%2C6.6%2C6.995%2C6.026%2C6.845%2C5.474%20c-0.191-0.698-0.695-1.36-1.438-1.786C4.068%2C2.922%2C2.464%2C3.214%2C1.82%2C4.338C1.536%2C4.836%2C1.489%2C5.414%2C1.64%2C5.97%20c0.189%2C0.698%2C0.694%2C1.36%2C1.438%2C1.787c0.328%2C0.187%2C0.67%2C0.31%2C1.01%2C0.372c0.002%2C0%2C0.006%2C0.002%2C0.008%2C0.004%20c0.027%2C0.004%2C0.057%2C0.009%2C0.088%2C0.011c2.12%2C0.316%2C3.203%2C0.915%2C3.73%2C1.337c-0.527%2C0.424-1.61%2C1.021-3.731%2C1.339%20c-0.029%2C0.003-0.058%2C0.007-0.087%2C0.012c-0.002%2C0.002-0.004%2C0.002-0.007%2C0.003c-0.341%2C0.062-0.684%2C0.187-1.013%2C0.374%20c-0.74%2C0.425-1.246%2C1.089-1.437%2C1.787c-0.149%2C0.555-0.105%2C1.133%2C0.181%2C1.632c0.011%2C0.018%2C0.021%2C0.033%2C0.033%2C0.049l0.883%2C0.783%20c0.765%2C0.366%2C1.775%2C0.328%2C2.67-0.184c0.744-0.425%2C1.248-1.088%2C1.439-1.786c0.148-0.552%2C0.104-1.126-0.176-1.62l2.573-1.473%20c0.573%2C0.287%2C2.299%2C1.292%2C2.299%2C1.292s3.602%2C1.445%2C4.241%2C1.812c0.773%2C0.191%2C0.566-0.151%2C0.566-0.151L12.285%2C9.711z%20M5.571%2C6.482%20C5.279%2C6.993%2C4.425%2C7.076%2C3.705%2C6.664C3.282%2C6.424%2C2.966%2C6.039%2C2.856%2C5.64C2.81%2C5.464%2C2.778%2C5.203%2C2.917%2C4.963%20c0.291-0.51%2C1.146-0.593%2C1.866-0.182C5.21%2C5.027%2C5.521%2C5.4%2C5.632%2C5.807C5.679%2C5.98%2C5.708%2C6.242%2C5.571%2C6.482z%20M5.632%2C13.159%20c-0.111%2C0.406-0.422%2C0.778-0.848%2C1.025c-0.719%2C0.409-1.576%2C0.327-1.867-0.184c-0.137-0.239-0.106-0.499-0.06-0.676%20c0.108-0.398%2C0.426-0.781%2C0.847-1.022c0.72-0.412%2C1.574-0.329%2C1.866%2C0.181C5.708%2C12.723%2C5.679%2C12.983%2C5.632%2C13.159z%20M16.181%2C5.139%20c-0.448%2C0.258-4.435%2C1.9-4.435%2C1.9s-1.556%2C0.855-2.104%2C1.13l0.937%2C0.843l2.057-0.229l4.11-3.638%20C16.745%2C5.146%2C17.013%2C4.664%2C16.181%2C5.139z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E%20');\n}\n.x6-widget-handle-unlink:hover {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20width%3D%2218.75px%22%20height%3D%2218.75px%22%20viewBox%3D%220%200%2018.75%2018.75%22%20enable-background%3D%22new%200%200%2018.75%2018.75%22%20xml%3Aspace%3D%22preserve%22%3E%3Cg%3E%3Cg%3E%3Cpath%20fill%3D%22%23FD6EB6%22%20d%3D%22M12.285%2C9.711l-2.104-0.302L9.243%2C8.568L6.669%2C7.095C6.948%2C6.6%2C6.995%2C6.026%2C6.845%2C5.474%20c-0.191-0.698-0.695-1.36-1.438-1.786C4.068%2C2.922%2C2.464%2C3.214%2C1.82%2C4.338C1.536%2C4.836%2C1.489%2C5.414%2C1.64%2C5.97%20c0.189%2C0.698%2C0.694%2C1.36%2C1.438%2C1.787c0.328%2C0.187%2C0.67%2C0.31%2C1.01%2C0.372c0.002%2C0%2C0.006%2C0.002%2C0.008%2C0.004%20c0.027%2C0.004%2C0.057%2C0.009%2C0.088%2C0.011c2.12%2C0.316%2C3.203%2C0.915%2C3.73%2C1.337c-0.527%2C0.424-1.61%2C1.021-3.731%2C1.339%20c-0.029%2C0.003-0.058%2C0.007-0.087%2C0.012c-0.002%2C0.002-0.004%2C0.002-0.007%2C0.003c-0.341%2C0.062-0.684%2C0.187-1.013%2C0.374%20c-0.74%2C0.425-1.246%2C1.089-1.437%2C1.787c-0.149%2C0.555-0.105%2C1.133%2C0.181%2C1.632c0.011%2C0.018%2C0.021%2C0.033%2C0.033%2C0.049l0.883%2C0.783%20c0.765%2C0.366%2C1.775%2C0.328%2C2.67-0.184c0.744-0.425%2C1.248-1.088%2C1.439-1.786c0.148-0.552%2C0.104-1.126-0.176-1.62l2.573-1.473%20c0.573%2C0.287%2C2.299%2C1.292%2C2.299%2C1.292s3.602%2C1.445%2C4.241%2C1.812c0.773%2C0.191%2C0.566-0.151%2C0.566-0.151L12.285%2C9.711z%20M5.571%2C6.482%20C5.279%2C6.993%2C4.425%2C7.076%2C3.705%2C6.664C3.282%2C6.424%2C2.966%2C6.039%2C2.856%2C5.64C2.81%2C5.464%2C2.778%2C5.203%2C2.917%2C4.963%20c0.291-0.51%2C1.146-0.593%2C1.866-0.182C5.21%2C5.027%2C5.521%2C5.4%2C5.632%2C5.807C5.679%2C5.98%2C5.708%2C6.242%2C5.571%2C6.482z%20M5.632%2C13.159%20c-0.111%2C0.406-0.422%2C0.778-0.848%2C1.025c-0.719%2C0.409-1.576%2C0.327-1.867-0.184c-0.137-0.239-0.106-0.499-0.06-0.676%20c0.108-0.398%2C0.426-0.781%2C0.847-1.022c0.72-0.412%2C1.574-0.329%2C1.866%2C0.181C5.708%2C12.723%2C5.679%2C12.983%2C5.632%2C13.159z%20M16.181%2C5.139%20c-0.448%2C0.258-4.435%2C1.9-4.435%2C1.9s-1.556%2C0.855-2.104%2C1.13l0.937%2C0.843l2.057-0.229l4.11-3.638%20C16.745%2C5.146%2C17.013%2C4.664%2C16.181%2C5.139z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E%20');\n}\n.x6-widget-handle-direction {\n background-image: url(\"data:image/svg+xml;charset=UTF-8,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3C!DOCTYPE%20svg%20%20PUBLIC%20'-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN'%20%20'http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd'%3E%3Csvg%20id%3D%22Layer_1%22%20style%3D%22enable-background%3Anew%200%200%20512%20512%3B%22%20version%3D%221.1%22%20viewBox%3D%220%200%20512%20512%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%09.st0%7Bfill%3A%236A6C8A%3Bstroke%3A%236A6C8A%3Bstroke-width%3A30%7D%0A%09.dot%7Bfill%3A%236A6C8A%3B%7D%0A%3C%2Fstyle%3E%3Cg%3E%3Cg%20id%3D%22XMLID_475_%22%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M133.1%2C277.1c1.8%2C0%2C3.7-0.6%2C5.4-1.7c4.1-3%2C5-8.7%2C2-12.8c-3-4.1-8.7-5-12.8-2c0%2C0%2C0%2C0%2C0%2C0%20%20%20%20%20c-4.1%2C3-5%2C8.7-2%2C12.8C127.5%2C275.8%2C130.3%2C277.1%2C133.1%2C277.1z%22%20id%3D%22XMLID_489_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M138.5%2C359.6c-4.1-3-9.8-2.1-12.8%2C2c-3%2C4.1-2.1%2C9.8%2C2%2C12.8c1.6%2C1.2%2C3.5%2C1.7%2C5.4%2C1.7%20%20%20%20%20c2.8%2C0%2C5.6-1.3%2C7.4-3.7C143.5%2C368.3%2C142.6%2C362.6%2C138.5%2C359.6z%22%20id%3D%22XMLID_726_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M108.1%2C327.7c-4.8%2C1.6-7.4%2C6.7-5.9%2C11.5c1.3%2C3.9%2C4.8%2C6.3%2C8.7%2C6.3c0.9%2C0%2C1.9-0.1%2C2.8-0.4%20%20%20%20%20c4.8-1.6%2C7.4-6.7%2C5.9-11.5C118%2C328.8%2C112.9%2C326.2%2C108.1%2C327.7z%22%20id%3D%22XMLID_776_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M108.1%2C307.3c0.9%2C0.3%2C1.9%2C0.4%2C2.8%2C0.4c3.8%2C0%2C7.4-2.4%2C8.7-6.3c1.6-4.8-1.1-9.9-5.9-11.5%20%20%20%20%20c-4.8-1.6-9.9%2C1.1-11.5%2C5.9C100.7%2C300.6%2C103.3%2C305.7%2C108.1%2C307.3z%22%20id%3D%22XMLID_777_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M169.2%2C265.4c2.4%2C0%2C4.7-1%2C6.5-2.6c1.7-1.7%2C2.7-4.1%2C2.7-6.5c0-2.4-1-4.8-2.7-6.5%20%20%20%20%20c-1.7-1.7-4.1-2.7-6.5-2.7s-4.7%2C1-6.5%2C2.7c-1.7%2C1.7-2.7%2C4-2.7%2C6.5c0%2C2.4%2C1%2C4.7%2C2.7%2C6.5C164.4%2C264.4%2C166.8%2C265.4%2C169.2%2C265.4z%22%20id%3D%22XMLID_797_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M247.7%2C256.3c0-5-4.1-9.1-9.1-9.1c-5%2C0-9.1%2C4.1-9.1%2C9.1c0%2C5%2C4.1%2C9.1%2C9.1%2C9.1%20%20%20%20%20C243.7%2C265.4%2C247.7%2C261.3%2C247.7%2C256.3z%22%20id%3D%22XMLID_798_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M213%2C256.3c0-5-4.1-9.1-9.1-9.1c-5%2C0-9.1%2C4.1-9.1%2C9.1c0%2C5%2C4.1%2C9.1%2C9.1%2C9.1%20%20%20%20%20C208.9%2C265.4%2C213%2C261.3%2C213%2C256.3z%22%20id%3D%22XMLID_799_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M317.2%2C256.3c0-5-4.1-9.1-9.1-9.1c-5%2C0-9.1%2C4.1-9.1%2C9.1c0%2C5%2C4.1%2C9.1%2C9.1%2C9.1%20%20%20%20%20C313.1%2C265.4%2C317.2%2C261.3%2C317.2%2C256.3z%22%20id%3D%22XMLID_800_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M282.5%2C256.3c0-5-4.1-9.1-9.1-9.1s-9.1%2C4.1-9.1%2C9.1c0%2C5%2C4.1%2C9.1%2C9.1%2C9.1%20%20%20%20%20S282.5%2C261.3%2C282.5%2C256.3z%22%20id%3D%22XMLID_801_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M401.1%2C185.2c0.9%2C0%2C1.9-0.1%2C2.8-0.5c4.8-1.6%2C7.4-6.7%2C5.9-11.5c-1.6-4.8-6.7-7.4-11.5-5.8%20%20%20%20%20c-4.8%2C1.6-7.4%2C6.7-5.8%2C11.5C393.6%2C182.8%2C397.2%2C185.2%2C401.1%2C185.2z%22%20id%3D%22XMLID_802_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M403.9%2C205.2c-4.8-1.6-9.9%2C1-11.5%2C5.9l0%2C0c-1.6%2C4.8%2C1.1%2C9.9%2C5.9%2C11.5%20%20%20%20%20c0.9%2C0.3%2C1.9%2C0.5%2C2.8%2C0.5c3.9%2C0%2C7.4-2.5%2C8.7-6.3c0%2C0%2C0%2C0%2C0%2C0C411.3%2C211.9%2C408.7%2C206.8%2C403.9%2C205.2z%22%20id%3D%22XMLID_803_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M373.5%2C237.2L373.5%2C237.2c-4.1%2C3-5%2C8.7-2%2C12.8c1.8%2C2.4%2C4.6%2C3.7%2C7.4%2C3.7%20%20%20%20%20c1.8%2C0%2C3.7-0.6%2C5.4-1.8c4.1-3%2C4.9-8.7%2C2-12.8C383.3%2C235.1%2C377.6%2C234.2%2C373.5%2C237.2z%22%20id%3D%22XMLID_804_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M373.5%2C152.9c1.6%2C1.2%2C3.5%2C1.8%2C5.4%2C1.8c2.8%2C0%2C5.6-1.3%2C7.4-3.8c3-4.1%2C2.1-9.8-2-12.7%20%20%20%20%20c-4.1-3-9.8-2.1-12.7%2C2C368.5%2C144.2%2C369.4%2C149.9%2C373.5%2C152.9z%22%20id%3D%22XMLID_805_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M342.8%2C247.1c-2.4%2C0-4.8%2C1-6.5%2C2.7c-1.7%2C1.7-2.7%2C4-2.7%2C6.5c0%2C2.4%2C1%2C4.7%2C2.7%2C6.4%20%20%20%20%20c1.7%2C1.7%2C4%2C2.7%2C6.5%2C2.7c2.4%2C0%2C4.7-1%2C6.5-2.7c1.7-1.7%2C2.7-4%2C2.7-6.4c0-2.4-1-4.8-2.7-6.5C347.6%2C248.1%2C345.2%2C247.1%2C342.8%2C247.1z%22%20id%3D%22XMLID_806_%22%2F%3E%0A%3Cpath%20class%3D%22st0%22%20d%3D%22M342.8%2C124.7H206.6l36.4-36.4c3.6-3.6%2C3.6-9.3%2C0-12.9c-3.6-3.6-9.3-3.6-12.9%2C0l-51.5%2C51.5%20%20%20%20%20c-1.9%2C1.9-2.8%2C4.4-2.7%2C6.9c-0.1%2C2.5%2C0.7%2C5%2C2.7%2C6.9l51.5%2C51.5c1.8%2C1.8%2C4.1%2C2.7%2C6.5%2C2.7c2.3%2C0%2C4.7-0.9%2C6.5-2.7%20%20%20%20%20c3.6-3.6%2C3.6-9.3%2C0-12.9l-36.4-36.4h136.1c0%2C0%2C0.1%2C0%2C0.1%2C0c0.6%2C0%2C1.2-0.1%2C1.8-0.2c0.2%2C0%2C0.4-0.1%2C0.6-0.1c0.1%2C0%2C0.2%2C0%2C0.3-0.1%20%20%20%20%20c3.2-1%2C5.6-3.6%2C6.3-6.9c0.1-0.6%2C0.2-1.2%2C0.2-1.8c0-0.6-0.1-1.2-0.2-1.8C351%2C127.8%2C347.3%2C124.7%2C342.8%2C124.7z%22%20id%3D%22XMLID_807_%22%2F%3E%0A%3Cpath%20class%3D%22st0%22%20d%3D%22M322.1%2C371.3l-51.5-51.5c-3.6-3.6-9.3-3.6-12.9%2C0c-3.6%2C3.6-3.6%2C9.3%2C0%2C12.9l36.9%2C36.9H169.2%20%20%20%20%20c-2.8%2C0-5.4%2C1.3-7%2C3.3c-0.1%2C0.1-0.2%2C0.2-0.3%2C0.4c-0.1%2C0.1-0.2%2C0.2-0.2%2C0.3c-0.1%2C0.1-0.1%2C0.2-0.2%2C0.4c-0.1%2C0.1-0.2%2C0.3-0.2%2C0.4%20%20%20%20%20c0%2C0.1-0.1%2C0.2-0.1%2C0.2c-0.1%2C0.2-0.2%2C0.4-0.3%2C0.6c0%2C0%2C0%2C0%2C0%2C0.1c-0.4%2C1.1-0.7%2C2.2-0.7%2C3.4c0%2C1.5%2C0.4%2C2.9%2C1%2C4.2c0%2C0%2C0%2C0.1%2C0.1%2C0.1%20%20%20%20%20c0.1%2C0.1%2C0.1%2C0.2%2C0.2%2C0.3c0.4%2C0.7%2C0.9%2C1.3%2C1.4%2C1.8c0.4%2C0.4%2C0.7%2C0.7%2C1.2%2C1c0.1%2C0.1%2C0.1%2C0.1%2C0.2%2C0.2c0%2C0%2C0.1%2C0%2C0.1%2C0.1%20%20%20%20%20c1.4%2C0.9%2C3.1%2C1.5%2C5%2C1.5h124.4l-36%2C36c-3.6%2C3.6-3.6%2C9.3%2C0%2C12.9c1.8%2C1.8%2C4.1%2C2.7%2C6.5%2C2.7c2.3%2C0%2C4.7-0.9%2C6.5-2.7l51.5-51.5%20%20%20%20%20c1.9-1.9%2C2.8-4.4%2C2.7-6.9C324.8%2C375.7%2C324%2C373.2%2C322.1%2C371.3z%22%20id%3D%22XMLID_808_%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n}\n.x6-widget-handle-direction:hover {\n background-image: url(\"data:image/svg+xml;charset=UTF-8,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3C!DOCTYPE%20svg%20%20PUBLIC%20'-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN'%20%20'http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd'%3E%3Csvg%20id%3D%22Layer_1%22%20style%3D%22enable-background%3Anew%200%200%20512%20512%3B%22%20version%3D%221.1%22%20viewBox%3D%220%200%20512%20512%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%0A%09.st0%7Bfill%3A%23FD6EB6%3Bstroke%3A%23FD6EB6%3Bstroke-width%3A30%7D%0A%09.dot%7Bfill%3A%23FD6EB6%3B%7D%0A%3C%2Fstyle%3E%3Cg%3E%3Cg%20id%3D%22XMLID_475_%22%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M133.1%2C277.1c1.8%2C0%2C3.7-0.6%2C5.4-1.7c4.1-3%2C5-8.7%2C2-12.8c-3-4.1-8.7-5-12.8-2c0%2C0%2C0%2C0%2C0%2C0%20%20%20%20%20c-4.1%2C3-5%2C8.7-2%2C12.8C127.5%2C275.8%2C130.3%2C277.1%2C133.1%2C277.1z%22%20id%3D%22XMLID_489_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M138.5%2C359.6c-4.1-3-9.8-2.1-12.8%2C2c-3%2C4.1-2.1%2C9.8%2C2%2C12.8c1.6%2C1.2%2C3.5%2C1.7%2C5.4%2C1.7%20%20%20%20%20c2.8%2C0%2C5.6-1.3%2C7.4-3.7C143.5%2C368.3%2C142.6%2C362.6%2C138.5%2C359.6z%22%20id%3D%22XMLID_726_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M108.1%2C327.7c-4.8%2C1.6-7.4%2C6.7-5.9%2C11.5c1.3%2C3.9%2C4.8%2C6.3%2C8.7%2C6.3c0.9%2C0%2C1.9-0.1%2C2.8-0.4%20%20%20%20%20c4.8-1.6%2C7.4-6.7%2C5.9-11.5C118%2C328.8%2C112.9%2C326.2%2C108.1%2C327.7z%22%20id%3D%22XMLID_776_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M108.1%2C307.3c0.9%2C0.3%2C1.9%2C0.4%2C2.8%2C0.4c3.8%2C0%2C7.4-2.4%2C8.7-6.3c1.6-4.8-1.1-9.9-5.9-11.5%20%20%20%20%20c-4.8-1.6-9.9%2C1.1-11.5%2C5.9C100.7%2C300.6%2C103.3%2C305.7%2C108.1%2C307.3z%22%20id%3D%22XMLID_777_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M169.2%2C265.4c2.4%2C0%2C4.7-1%2C6.5-2.6c1.7-1.7%2C2.7-4.1%2C2.7-6.5c0-2.4-1-4.8-2.7-6.5%20%20%20%20%20c-1.7-1.7-4.1-2.7-6.5-2.7s-4.7%2C1-6.5%2C2.7c-1.7%2C1.7-2.7%2C4-2.7%2C6.5c0%2C2.4%2C1%2C4.7%2C2.7%2C6.5C164.4%2C264.4%2C166.8%2C265.4%2C169.2%2C265.4z%22%20id%3D%22XMLID_797_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M247.7%2C256.3c0-5-4.1-9.1-9.1-9.1c-5%2C0-9.1%2C4.1-9.1%2C9.1c0%2C5%2C4.1%2C9.1%2C9.1%2C9.1%20%20%20%20%20C243.7%2C265.4%2C247.7%2C261.3%2C247.7%2C256.3z%22%20id%3D%22XMLID_798_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M213%2C256.3c0-5-4.1-9.1-9.1-9.1c-5%2C0-9.1%2C4.1-9.1%2C9.1c0%2C5%2C4.1%2C9.1%2C9.1%2C9.1%20%20%20%20%20C208.9%2C265.4%2C213%2C261.3%2C213%2C256.3z%22%20id%3D%22XMLID_799_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M317.2%2C256.3c0-5-4.1-9.1-9.1-9.1c-5%2C0-9.1%2C4.1-9.1%2C9.1c0%2C5%2C4.1%2C9.1%2C9.1%2C9.1%20%20%20%20%20C313.1%2C265.4%2C317.2%2C261.3%2C317.2%2C256.3z%22%20id%3D%22XMLID_800_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M282.5%2C256.3c0-5-4.1-9.1-9.1-9.1s-9.1%2C4.1-9.1%2C9.1c0%2C5%2C4.1%2C9.1%2C9.1%2C9.1%20%20%20%20%20S282.5%2C261.3%2C282.5%2C256.3z%22%20id%3D%22XMLID_801_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M401.1%2C185.2c0.9%2C0%2C1.9-0.1%2C2.8-0.5c4.8-1.6%2C7.4-6.7%2C5.9-11.5c-1.6-4.8-6.7-7.4-11.5-5.8%20%20%20%20%20c-4.8%2C1.6-7.4%2C6.7-5.8%2C11.5C393.6%2C182.8%2C397.2%2C185.2%2C401.1%2C185.2z%22%20id%3D%22XMLID_802_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M403.9%2C205.2c-4.8-1.6-9.9%2C1-11.5%2C5.9l0%2C0c-1.6%2C4.8%2C1.1%2C9.9%2C5.9%2C11.5%20%20%20%20%20c0.9%2C0.3%2C1.9%2C0.5%2C2.8%2C0.5c3.9%2C0%2C7.4-2.5%2C8.7-6.3c0%2C0%2C0%2C0%2C0%2C0C411.3%2C211.9%2C408.7%2C206.8%2C403.9%2C205.2z%22%20id%3D%22XMLID_803_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M373.5%2C237.2L373.5%2C237.2c-4.1%2C3-5%2C8.7-2%2C12.8c1.8%2C2.4%2C4.6%2C3.7%2C7.4%2C3.7%20%20%20%20%20c1.8%2C0%2C3.7-0.6%2C5.4-1.8c4.1-3%2C4.9-8.7%2C2-12.8C383.3%2C235.1%2C377.6%2C234.2%2C373.5%2C237.2z%22%20id%3D%22XMLID_804_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M373.5%2C152.9c1.6%2C1.2%2C3.5%2C1.8%2C5.4%2C1.8c2.8%2C0%2C5.6-1.3%2C7.4-3.8c3-4.1%2C2.1-9.8-2-12.7%20%20%20%20%20c-4.1-3-9.8-2.1-12.7%2C2C368.5%2C144.2%2C369.4%2C149.9%2C373.5%2C152.9z%22%20id%3D%22XMLID_805_%22%2F%3E%0A%3Cpath%20class%3D%22dot%22%20d%3D%22M342.8%2C247.1c-2.4%2C0-4.8%2C1-6.5%2C2.7c-1.7%2C1.7-2.7%2C4-2.7%2C6.5c0%2C2.4%2C1%2C4.7%2C2.7%2C6.4%20%20%20%20%20c1.7%2C1.7%2C4%2C2.7%2C6.5%2C2.7c2.4%2C0%2C4.7-1%2C6.5-2.7c1.7-1.7%2C2.7-4%2C2.7-6.4c0-2.4-1-4.8-2.7-6.5C347.6%2C248.1%2C345.2%2C247.1%2C342.8%2C247.1z%22%20id%3D%22XMLID_806_%22%2F%3E%0A%3Cpath%20class%3D%22st0%22%20d%3D%22M342.8%2C124.7H206.6l36.4-36.4c3.6-3.6%2C3.6-9.3%2C0-12.9c-3.6-3.6-9.3-3.6-12.9%2C0l-51.5%2C51.5%20%20%20%20%20c-1.9%2C1.9-2.8%2C4.4-2.7%2C6.9c-0.1%2C2.5%2C0.7%2C5%2C2.7%2C6.9l51.5%2C51.5c1.8%2C1.8%2C4.1%2C2.7%2C6.5%2C2.7c2.3%2C0%2C4.7-0.9%2C6.5-2.7%20%20%20%20%20c3.6-3.6%2C3.6-9.3%2C0-12.9l-36.4-36.4h136.1c0%2C0%2C0.1%2C0%2C0.1%2C0c0.6%2C0%2C1.2-0.1%2C1.8-0.2c0.2%2C0%2C0.4-0.1%2C0.6-0.1c0.1%2C0%2C0.2%2C0%2C0.3-0.1%20%20%20%20%20c3.2-1%2C5.6-3.6%2C6.3-6.9c0.1-0.6%2C0.2-1.2%2C0.2-1.8c0-0.6-0.1-1.2-0.2-1.8C351%2C127.8%2C347.3%2C124.7%2C342.8%2C124.7z%22%20id%3D%22XMLID_807_%22%2F%3E%0A%3Cpath%20class%3D%22st0%22%20d%3D%22M322.1%2C371.3l-51.5-51.5c-3.6-3.6-9.3-3.6-12.9%2C0c-3.6%2C3.6-3.6%2C9.3%2C0%2C12.9l36.9%2C36.9H169.2%20%20%20%20%20c-2.8%2C0-5.4%2C1.3-7%2C3.3c-0.1%2C0.1-0.2%2C0.2-0.3%2C0.4c-0.1%2C0.1-0.2%2C0.2-0.2%2C0.3c-0.1%2C0.1-0.1%2C0.2-0.2%2C0.4c-0.1%2C0.1-0.2%2C0.3-0.2%2C0.4%20%20%20%20%20c0%2C0.1-0.1%2C0.2-0.1%2C0.2c-0.1%2C0.2-0.2%2C0.4-0.3%2C0.6c0%2C0%2C0%2C0%2C0%2C0.1c-0.4%2C1.1-0.7%2C2.2-0.7%2C3.4c0%2C1.5%2C0.4%2C2.9%2C1%2C4.2c0%2C0%2C0%2C0.1%2C0.1%2C0.1%20%20%20%20%20c0.1%2C0.1%2C0.1%2C0.2%2C0.2%2C0.3c0.4%2C0.7%2C0.9%2C1.3%2C1.4%2C1.8c0.4%2C0.4%2C0.7%2C0.7%2C1.2%2C1c0.1%2C0.1%2C0.1%2C0.1%2C0.2%2C0.2c0%2C0%2C0.1%2C0%2C0.1%2C0.1%20%20%20%20%20c1.4%2C0.9%2C3.1%2C1.5%2C5%2C1.5h124.4l-36%2C36c-3.6%2C3.6-3.6%2C9.3%2C0%2C12.9c1.8%2C1.8%2C4.1%2C2.7%2C6.5%2C2.7c2.3%2C0%2C4.7-0.9%2C6.5-2.7l51.5-51.5%20%20%20%20%20c1.9-1.9%2C2.8-4.4%2C2.7-6.9C324.8%2C375.7%2C324%2C373.2%2C322.1%2C371.3z%22%20id%3D%22XMLID_808_%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n}\n.x6-widget-handle-surround .x6-widget-handle-animate .x6-widget-handle {\n transition: background-size 80ms, width 80ms, height 80ms, top 150ms, left 150ms, bottom 150ms, right 150ms;\n}\n.x6-widget-handle-surround .x6-widget-handle-pos-se {\n right: -25px;\n bottom: -25px;\n}\n.x6-widget-handle-surround .x6-widget-handle-pos-nw {\n top: -21px;\n left: -25px;\n}\n.x6-widget-handle-surround .x6-widget-handle-pos-n {\n top: -22px;\n left: 50%;\n margin-left: -10px;\n}\n.x6-widget-handle-surround .x6-widget-handle-pos-e {\n top: -webkit-calc(40%);\n top: calc(50% - 10px);\n right: -25px;\n}\n.x6-widget-handle-surround .x6-widget-handle-pos-ne {\n top: -21px;\n right: -25px;\n}\n.x6-widget-handle-surround .x6-widget-handle-pos-w {\n top: 50%;\n left: -25px;\n margin-top: -10px;\n}\n.x6-widget-handle-surround .x6-widget-handle-pos-sw {\n bottom: -25px;\n left: -25px;\n}\n.x6-widget-handle-surround .x6-widget-handle-pos-s {\n bottom: -24px;\n left: 50%;\n margin-left: -10px;\n}\n.x6-widget-handle-surround .x6-widget-handle-small .x6-widget-handle {\n width: 15px;\n height: 15px;\n font-size: 15px;\n background-size: 15px 15px;\n}\n.x6-widget-handle-surround .x6-widget-handle-small .x6-widget-handle-pos-se {\n right: -19px;\n bottom: -19px;\n}\n.x6-widget-handle-surround .x6-widget-handle-small .x6-widget-handle-pos-nw {\n top: -19px;\n left: -19px;\n}\n.x6-widget-handle-surround .x6-widget-handle-small .x6-widget-handle-pos-n {\n top: -19px;\n margin-left: -7.5px;\n}\n.x6-widget-handle-surround .x6-widget-handle-small .x6-widget-handle-pos-e {\n top: -webkit-calc(42%);\n top: calc(50% - 8px);\n right: -19px;\n}\n.x6-widget-handle-surround .x6-widget-handle-small .x6-widget-handle-pos-ne {\n top: -19px;\n right: -19px;\n}\n.x6-widget-handle-surround .x6-widget-handle-small .x6-widget-handle-pos-w {\n left: -19px;\n margin-top: -8px;\n}\n.x6-widget-handle-surround .x6-widget-handle-small .x6-widget-handle-pos-sw {\n bottom: -19px;\n left: -19px;\n}\n.x6-widget-handle-surround .x6-widget-handle-small .x6-widget-handle-pos-s {\n bottom: -19px;\n margin-left: -7.5px;\n}\n.x6-widget-handle-surround .x6-widget-handle-tiny .x6-widget-handle {\n width: 10px;\n height: 10px;\n font-size: 10px;\n background-size: 10px 10px;\n}\n.x6-widget-handle-surround .x6-widget-handle-tiny .x6-widget-handle-pos-se {\n right: -15px;\n bottom: -13px;\n}\n.x6-widget-handle-surround .x6-widget-handle-tiny .x6-widget-handle-pos-nw {\n top: -13px;\n left: -15px;\n}\n.x6-widget-handle-surround .x6-widget-handle-tiny .x6-widget-handle-pos-n {\n top: -13px;\n margin-left: -5px;\n}\n.x6-widget-handle-surround .x6-widget-handle-tiny .x6-widget-handle-pos-e {\n top: -webkit-calc(45%);\n top: calc(50% - 5px);\n right: -15px;\n}\n.x6-widget-handle-surround .x6-widget-handle-tiny .x6-widget-handle-pos-ne {\n top: -13px;\n right: -15px;\n}\n.x6-widget-handle-surround .x6-widget-handle-tiny .x6-widget-handle-pos-w {\n left: -15px;\n margin-top: -5px;\n}\n.x6-widget-handle-surround .x6-widget-handle-tiny .x6-widget-handle-pos-sw {\n bottom: -13px;\n left: -15px;\n}\n.x6-widget-handle-surround .x6-widget-handle-tiny .x6-widget-handle-pos-s {\n bottom: -13px;\n margin-left: -5px;\n}\n.x6-widget-handle-toolbar {\n position: absolute;\n top: -50px;\n display: table-row;\n padding: 7px 5px;\n}\n.x6-widget-handle-toolbar::after {\n position: absolute;\n top: 100%;\n left: 10px;\n width: 0;\n height: 0;\n margin-top: 4px;\n border-right: 10px solid transparent;\n border-left: 10px solid transparent;\n content: '';\n}\n.x6-widget-handle-toolbar .x6-widget-handle {\n position: relative;\n display: table-cell;\n min-width: 20px;\n margin: 0 2px;\n background-position: 3px 3px;\n background-size: 16px 16px;\n}\n.x6-widget-handle-toolbar .x6-widget-handle::after {\n position: absolute;\n bottom: -11px;\n width: 100%;\n content: '';\n}\n.x6-widget-handle-pie {\n position: absolute;\n top: -webkit-calc(0%);\n top: calc(50% - 50px);\n right: -50px;\n z-index: 1;\n display: none;\n width: 100px;\n height: 100px;\n margin: -2px -2px 0 0;\n border-radius: 50%;\n cursor: default;\n pointer-events: visiblePainted;\n}\n.x6-widget-handle-pie .x6-widget-handle {\n width: 1px;\n height: auto;\n pointer-events: visiblePainted;\n}\n.x6-widget-handle-pie-slice-svg {\n width: 100%;\n height: 100%;\n overflow: visible !important;\n}\n.x6-widget-handle-pie-slice-img,\n.x6-widget-handle-pie-slice-txt {\n display: none;\n pointer-events: none;\n}\n.x6-widget-handle-pie[data-pie-toggle-position='e'] {\n top: calc(50% - 50px);\n right: -50px;\n left: auto;\n}\n.x6-widget-handle-pie[data-pie-toggle-position='w'] {\n top: calc(50% - 50px);\n right: auto;\n left: -52px;\n}\n.x6-widget-handle-pie[data-pie-toggle-position='n'] {\n top: -50px;\n right: auto;\n bottom: auto;\n left: calc(50% - 52px);\n}\n.x6-widget-handle-pie[data-pie-toggle-position='s'] {\n top: auto;\n right: auto;\n bottom: -52px;\n left: calc(50% - 52px);\n}\n.x6-widget-handle-pie-opened {\n display: block;\n animation: halo-pie-visibility 0.1s, halo-pie-opening 0.1s;\n animation-timing-function: step-end, ease;\n animation-delay: 0s, 0.1s;\n}\n.x6-widget-handle-pie-toggle {\n position: absolute;\n top: -webkit-calc(35%);\n top: calc(50% - 15px);\n right: -15px;\n z-index: 2;\n display: block;\n box-sizing: border-box;\n width: 30px;\n height: 30px;\n background-repeat: no-repeat;\n background-position: center;\n background-size: 20px 20px;\n border-radius: 50%;\n cursor: pointer;\n user-select: none;\n pointer-events: visiblePainted;\n -webkit-user-drag: none;\n user-drag: none;\n /* stylelint-disable-line */\n}\n.x6-widget-handle-pie-toggle-pos-e {\n top: -webkit-calc(35%);\n top: calc(50% - 15px);\n right: -15px;\n bottom: auto;\n left: auto;\n}\n.x6-widget-handle-pie-toggle-pos-w {\n top: -webkit-calc(35%);\n top: calc(50% - 15px);\n right: auto;\n bottom: auto;\n left: -15px;\n}\n.x6-widget-handle-pie-toggle-pos-n {\n top: -15px;\n right: auto;\n bottom: auto;\n left: -webkit-calc(35%);\n left: calc(50% - 15px);\n}\n.x6-widget-handle-pie-toggle-pos-s {\n top: auto;\n right: auto;\n bottom: -15px;\n left: -webkit-calc(35%);\n left: calc(50% - 15px);\n}\n.x6-widget-handle-pie-toggle-opened {\n transition: 0.1s background-image;\n}\n.x6-widget-handle-toolbar {\n position: static;\n display: inline-block;\n margin-top: -50px;\n margin-left: 45px;\n white-space: nowrap;\n vertical-align: top;\n background-color: #f5f5f5;\n border-bottom: 3px solid #333;\n border-radius: 5px;\n box-shadow: 0 1px 2px #222;\n}\n.x6-widget-handle-toolbar::after {\n top: -12px;\n left: 55px;\n margin-top: 0;\n border-top: 6px solid #333;\n border-right: 10px solid transparent;\n border-left: 10px solid transparent;\n}\n.x6-widget-handle-toolbar .x6-widget-handle {\n display: inline-block;\n vertical-align: top;\n}\n.x6-widget-handle-toolbar .x6-widget-handle:hover::after {\n border-bottom: 4px solid #fc6cb8;\n}\n.x6-widget-handle-toolbar .x6-widget-handle-rotate {\n position: absolute;\n top: 100%;\n right: 100%;\n margin-top: 3px;\n margin-right: 6px;\n}\n.x6-widget-handle-toolbar .x6-widget-handle-remove:hover::after,\n.x6-widget-handle-toolbar .x6-widget-handle-rotate:hover::after {\n border-bottom: none;\n}\n.x6-widget-handle-toolbar .x6-widget-handle + .x6-widget-handle {\n margin-left: 4px;\n}\n.x6-widget-handle-pie {\n box-sizing: content-box;\n background-color: #f5f5f5;\n border: 2px solid #404040;\n}\n.x6-widget-handle-pie-slice {\n fill: transparent;\n stroke: #e9e9e9;\n stroke-width: 1;\n}\n.x6-widget-handle-pie-slice:hover {\n fill: #fff;\n}\n.x6-widget-handle-pie-slice-img {\n display: block;\n}\n.x6-widget-handle-selected .x6-widget-handle-pie-slice {\n fill: #fff;\n}\n.x6-widget-handle-pie-toggle {\n background-color: #f6f6f6;\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20height%3D%2216px%22%20id%3D%22Layer_1%22%20style%3D%22enable-background%3Anew%200%200%2016%2016%3B%22%20version%3D%221.1%22%20viewBox%3D%220%200%2016%2016%22%20width%3D%2216px%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cpath%20fill%3D%22%236A6C8A%22%20d%3D%22M15%2C6h-5V1c0-0.55-0.45-1-1-1H7C6.45%2C0%2C6%2C0.45%2C6%2C1v5H1C0.45%2C6%2C0%2C6.45%2C0%2C7v2c0%2C0.55%2C0.45%2C1%2C1%2C1h5v5c0%2C0.55%2C0.45%2C1%2C1%2C1h2%20c0.55%2C0%2C1-0.45%2C1-1v-5h5c0.55%2C0%2C1-0.45%2C1-1V7C16%2C6.45%2C15.55%2C6%2C15%2C6z%22%2F%3E%3C%2Fsvg%3E');\n background-size: 16px 16px;\n border: 2px solid #3b425f;\n}\n.x6-widget-handle-pie-toggle:hover {\n background-color: #fff;\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20height%3D%2216px%22%20id%3D%22Layer_1%22%20style%3D%22enable-background%3Anew%200%200%2016%2016%3B%22%20version%3D%221.1%22%20viewBox%3D%220%200%2016%2016%22%20width%3D%2216px%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cpath%20fill%3D%22%23FD6EB6%22%20d%3D%22M15%2C6h-5V1c0-0.55-0.45-1-1-1H7C6.45%2C0%2C6%2C0.45%2C6%2C1v5H1C0.45%2C6%2C0%2C6.45%2C0%2C7v2c0%2C0.55%2C0.45%2C1%2C1%2C1h5v5c0%2C0.55%2C0.45%2C1%2C1%2C1h2%20c0.55%2C0%2C1-0.45%2C1-1v-5h5c0.55%2C0%2C1-0.45%2C1-1V7C16%2C6.45%2C15.55%2C6%2C15%2C6z%22%2F%3E%3C%2Fsvg%3E');\n border-color: #fd6eb6;\n}\n.x6-widget-handle-pie-toggle-opened {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%3Csvg%20xmlns%3Adc%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%22%20xmlns%3Acc%3D%22http%3A%2F%2Fcreativecommons.org%2Fns%23%22%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%20xmlns%3Asvg%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20id%3D%22Layer_1%22%20xml%3Aspace%3D%22preserve%22%3E%3Cmetadata%20id%3D%22metadata9%22%3E%3Crdf%3ARDF%3E%3Ccc%3AWork%20rdf%3Aabout%3D%22%22%3E%3Cdc%3Aformat%3Eimage%2Fsvg%2Bxml%3C%2Fdc%3Aformat%3E%3Cdc%3Atype%20rdf%3Aresource%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Fdcmitype%2FStillImage%22%20%2F%3E%3Cdc%3Atitle%3E%3C%2Fdc%3Atitle%3E%3C%2Fcc%3AWork%3E%3C%2Frdf%3ARDF%3E%3C%2Fmetadata%3E%3Cdefs%20id%3D%22defs7%22%20%2F%3E%3Cpath%20d%3D%22M%2015%2C6%2010%2C6%20C%201.0301983%2C6.00505%2015.002631%2C6.011353%206%2C6%20L%201%2C6%20C%200.45%2C6%200%2C6.45%200%2C7%20l%200%2C2%20c%200%2C0.55%200.45%2C1%201%2C1%20l%205%2C0%20c%208.988585%2C-0.019732%20-5.02893401%2C-0.018728%204%2C0%20l%205%2C0%20c%200.55%2C0%201%2C-0.45%201%2C-1%20L%2016%2C7%20C%2016%2C6.45%2015.55%2C6%2015%2C6%20z%22%20id%3D%22path3%22%20style%3D%22fill%3A%236a6c8a%22%20%2F%3E%3C%2Fsvg%3E');\n}\n.x6-widget-handle-pie-toggle-opened:hover {\n background-image: url('data:image/svg+xml;charset=utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%3Csvg%20xmlns%3Adc%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%22%20xmlns%3Acc%3D%22http%3A%2F%2Fcreativecommons.org%2Fns%23%22%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%20xmlns%3Asvg%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20id%3D%22Layer_1%22%20xml%3Aspace%3D%22preserve%22%3E%3Cmetadata%20id%3D%22metadata9%22%3E%3Crdf%3ARDF%3E%3Ccc%3AWork%20rdf%3Aabout%3D%22%22%3E%3Cdc%3Aformat%3Eimage%2Fsvg%2Bxml%3C%2Fdc%3Aformat%3E%3Cdc%3Atype%20rdf%3Aresource%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Fdcmitype%2FStillImage%22%20%2F%3E%3Cdc%3Atitle%3E%3C%2Fdc%3Atitle%3E%3C%2Fcc%3AWork%3E%3C%2Frdf%3ARDF%3E%3C%2Fmetadata%3E%3Cdefs%20id%3D%22defs7%22%20%2F%3E%3Cpath%20d%3D%22M%2015%2C6%2010%2C6%20C%201.0301983%2C6.00505%2015.002631%2C6.011353%206%2C6%20L%201%2C6%20C%200.45%2C6%200%2C6.45%200%2C7%20l%200%2C2%20c%200%2C0.55%200.45%2C1%201%2C1%20l%205%2C0%20c%208.988585%2C-0.019732%20-5.02893401%2C-0.018728%204%2C0%20l%205%2C0%20c%200.55%2C0%201%2C-0.45%201%2C-1%20L%2016%2C7%20C%2016%2C6.45%2015.55%2C6%2015%2C6%20z%22%20id%3D%22path3%22%20style%3D%22fill%3A%23FD6EB6%22%20%2F%3E%3C%2Fsvg%3E');\n}\n.x6-widget-dnd {\n position: absolute;\n top: -10000px;\n left: -10000px;\n z-index: 999999;\n display: none;\n cursor: move;\n opacity: 0.7;\n pointer-events: 'cursor';\n}\n.x6-widget-dnd.dragging {\n display: inline-block;\n}\n.x6-widget-dnd.dragging * {\n pointer-events: none !important;\n}\n.x6-widget-dnd .x6-graph {\n background: transparent;\n box-shadow: none;\n}\n.x6-widget-halo {\n position: absolute;\n pointer-events: none;\n}\n.x6-widget-halo-content {\n position: absolute;\n top: 100%;\n padding: 6px;\n font-size: 10px;\n line-height: 14px;\n text-align: center;\n border-radius: 6px;\n}\n.x6-widget-halo-handles + .x6-widget-halo-content {\n right: -20px;\n left: -20px;\n margin-top: 30px;\n}\n.x6-widget-halo-handles.x6-widget-handle-small + .x6-widget-halo-content {\n margin-top: 25px;\n}\n.x6-widget-halo-handles.x6-widget-handle-small + .x6-widget-halo-content {\n margin-top: 20px;\n}\n.x6-widget-halo-handles.x6-widget-handle-pie + .x6-widget-halo-content {\n right: 0;\n left: 0;\n margin-top: 10px;\n}\n.x6-widget-halo-content {\n color: #fff;\n background-color: #6a6b8a;\n}\n.x6-widget-halo.type-node .x6-widget-handle-toolbar .x6-widget-handle-remove {\n position: absolute;\n right: 100%;\n bottom: 100%;\n margin-right: 6px;\n margin-bottom: 3px;\n}\n.x6-widget-halo.type-edge .x6-widget-handle-surround .x6-widget-handle-remove {\n background-color: #fff;\n border-radius: 50%;\n}\n.x6-widget-halo.type-edge .x6-widget-handle-toolbar {\n margin-top: -60px;\n margin-left: -18px;\n}\n.x6-widget-halo.type-edge .x6-widget-handle-toolbar::after {\n top: -22px;\n left: -9px;\n}\n.x6-widget-minimap {\n position: relative;\n display: table-cell;\n box-sizing: border-box;\n overflow: hidden;\n text-align: center;\n vertical-align: middle;\n background-color: #fff;\n user-select: none;\n}\n.x6-widget-minimap .x6-graph {\n display: inline-block;\n box-shadow: 0 0 4px 0 #eee;\n cursor: pointer;\n}\n.x6-widget-minimap .x6-graph > svg {\n pointer-events: none;\n shape-rendering: optimizeSpeed;\n}\n.x6-widget-minimap .x6-graph .x6-node * {\n /* stylelint-disable-next-line */\n vector-effect: initial;\n}\n.x6-widget-minimap-viewport {\n position: absolute;\n box-sizing: content-box !important;\n margin: -2px 0 0 -2px;\n border: 2px solid #31d0c6;\n cursor: move;\n}\n.x6-widget-minimap-viewport-zoom {\n position: absolute;\n right: 0;\n bottom: 0;\n box-sizing: border-box;\n width: 12px;\n height: 12px;\n margin: 0 -6px -6px 0;\n background-color: #fff;\n border: 2px solid #31d0c6;\n border-radius: 50%;\n cursor: nwse-resize;\n}\n.x6-graph-scroller {\n position: relative;\n box-sizing: border-box;\n overflow: scroll;\n outline: none;\n}\n.x6-graph-scroller-content {\n position: relative;\n}\n.x6-graph-scroller-background {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n.x6-graph-scroller .x6-graph {\n position: absolute;\n display: inline-block;\n margin: 0;\n box-shadow: none;\n}\n.x6-graph-scroller .x6-graph > svg {\n display: block;\n}\n.x6-graph-scroller.x6-graph-scroller-paged .x6-graph {\n box-shadow: 0 0 4px 0 #eee;\n}\n.x6-graph-scroller.x6-graph-scroller-pannable[data-panning='false'] {\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n.x6-graph-scroller.x6-graph-scroller-pannable[data-panning='true'] {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n}\n.x6-graph-pagebreak {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n.x6-graph-pagebreak-vertical {\n position: absolute;\n top: 0;\n bottom: 0;\n box-sizing: border-box;\n width: 1px;\n border-left: 1px dashed #bdbdbd;\n}\n.x6-graph-pagebreak-horizontal {\n position: absolute;\n right: 0;\n left: 0;\n box-sizing: border-box;\n height: 1px;\n border-top: 1px dashed #bdbdbd;\n}\n.x6-widget-selection {\n position: absolute;\n display: none;\n width: 0;\n height: 0;\n touch-action: none;\n}\n.x6-widget-selection-rubberband {\n display: block;\n overflow: visible;\n opacity: 0.3;\n}\n.x6-widget-selection-selected {\n display: block;\n}\n.x6-widget-selection-box {\n cursor: move;\n}\n.x6-widget-selection-inner[data-selection-length='0'],\n.x6-widget-selection-inner[data-selection-length='1'] {\n display: none;\n}\n.x6-widget-selection-content {\n position: absolute;\n top: 100%;\n right: -20px;\n left: -20px;\n margin-top: 30px;\n padding: 6px;\n line-height: 14px;\n text-align: center;\n border-radius: 6px;\n}\n.x6-widget-selection-content:empty {\n display: none;\n}\n.x6-widget-selection-rubberband {\n background-color: #3498db;\n border: 2px solid #2980b9;\n}\n.x6-widget-selection-box {\n box-sizing: content-box !important;\n margin-top: -4px;\n margin-left: -4px;\n padding-right: 4px;\n padding-bottom: 4px;\n border: 2px dashed #feb663;\n box-shadow: 2px 2px 5px #d3d3d3;\n}\n.x6-widget-selection-inner {\n box-sizing: content-box !important;\n margin-top: -8px;\n margin-left: -8px;\n padding-right: 12px;\n padding-bottom: 12px;\n border: 2px solid #feb663;\n box-shadow: 2px 2px 5px #d3d3d3;\n}\n.x6-widget-selection-content {\n color: #fff;\n font-size: 10px;\n background-color: #6a6b8a;\n}\n.x6-widget-snapline {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n pointer-events: none;\n}\n.x6-widget-snapline-vertical,\n.x6-widget-snapline-horizontal {\n position: absolute;\n opacity: 1;\n pointer-events: none;\n}\n.x6-widget-snapline-horizontal {\n border-bottom: 1px solid #2ecc71;\n}\n.x6-widget-snapline-vertical {\n border-right: 1px solid #2ecc71;\n}\n.x6-widget-stencil {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n}\n.x6-widget-stencil::after {\n position: absolute;\n top: 0;\n display: block;\n width: 100%;\n height: 20px;\n padding: 8px 0;\n line-height: 20px;\n text-align: center;\n opacity: 0;\n transition: top 0.1s linear, opacity 0.1s linear;\n content: ' ';\n pointer-events: none;\n}\n.x6-widget-stencil-content {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: auto;\n overflow-x: hidden;\n overflow-y: auto;\n}\n.x6-widget-stencil .x6-node [magnet]:not([magnet='passive']) {\n pointer-events: none;\n}\n.x6-widget-stencil-group {\n padding: 0;\n padding-bottom: 8px;\n overflow: hidden;\n user-select: none;\n}\n.x6-widget-stencil-group.collapsed {\n height: auto;\n padding-bottom: 0;\n}\n.x6-widget-stencil-group-title {\n position: relative;\n margin-top: 0;\n margin-bottom: 0;\n padding: 4px;\n cursor: pointer;\n}\n.x6-widget-stencil-title,\n.x6-widget-stencil-group > .x6-widget-stencil-group-title {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n user-select: none;\n}\n.x6-widget-stencil .unmatched {\n opacity: 0.3;\n}\n.x6-widget-stencil .x6-node.unmatched {\n display: none;\n}\n.x6-widget-stencil-group.unmatched {\n display: none;\n}\n.x6-widget-stencil-search-text {\n position: relative;\n z-index: 1;\n box-sizing: border-box;\n width: 100%;\n height: 30px;\n max-height: 30px;\n line-height: 30px;\n outline: 0;\n}\n.x6-widget-stencil.not-found::after {\n opacity: 1;\n content: attr(data-not-found-text);\n}\n.x6-widget-stencil.not-found.searchable::after {\n top: 30px;\n}\n.x6-widget-stencil.not-found.searchable.collapsable::after {\n top: 50px;\n}\n.x6-widget-stencil {\n color: #333;\n background: #f5f5f5;\n}\n.x6-widget-stencil-content {\n position: absolute;\n}\n.x6-widget-stencil.collapsable > .x6-widget-stencil-content {\n top: 32px;\n}\n.x6-widget-stencil.searchable > .x6-widget-stencil-content {\n top: 80px;\n}\n.x6-widget-stencil.not-found::after {\n position: absolute;\n}\n.x6-widget-stencil.not-found.searchable.collapsable::after {\n top: 80px;\n}\n.x6-widget-stencil.not-found.searchable::after {\n top: 60px;\n}\n.x6-widget-stencil-group {\n height: auto;\n margin-bottom: 1px;\n padding: 0;\n transition: none;\n}\n.x6-widget-stencil-group .x6-graph {\n background: transparent;\n box-shadow: none;\n}\n.x6-widget-stencil-group.collapsed {\n height: auto;\n max-height: 31px;\n}\n.x6-widget-stencil-title,\n.x6-widget-stencil-group > .x6-widget-stencil-group-title {\n position: relative;\n left: 0;\n box-sizing: border-box;\n width: 100%;\n height: 32px;\n padding: 0 5px 0 8px;\n color: #666;\n font-weight: 700;\n font-size: 12px;\n line-height: 32px;\n cursor: default;\n transition: all 0.3;\n}\n.x6-widget-stencil-title:hover,\n.x6-widget-stencil-group > .x6-widget-stencil-group-title:hover {\n color: #444;\n}\n.x6-widget-stencil-title {\n background: #e9e9e9;\n}\n.x6-widget-stencil-group > .x6-widget-stencil-group-title {\n background: #ededed;\n}\n.x6-widget-stencil.collapsable > .x6-widget-stencil-title,\n.x6-widget-stencil-group.collapsable > .x6-widget-stencil-group-title {\n padding-left: 32px;\n cursor: pointer;\n}\n.x6-widget-stencil.collapsable > .x6-widget-stencil-title::before,\n.x6-widget-stencil-group.collapsable > .x6-widget-stencil-group-title::before {\n position: absolute;\n top: 6px;\n left: 8px;\n display: block;\n width: 18px;\n height: 18px;\n margin: 0;\n padding: 0;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: 0 0;\n border: none;\n content: ' ';\n}\n.x6-widget-stencil.collapsable > .x6-widget-stencil-title::before,\n.x6-widget-stencil-group.collapsable > .x6-widget-stencil-group-title::before {\n background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNOS4zNzUuNUM0LjY4Ny41Ljg3NSA0LjMxMy44NzUgOWMwIDQuNjg4IDMuODEyIDguNSA4LjUgOC41IDQuNjg3IDAgOC41LTMuODEyIDguNS04LjUgMC00LjY4Ny0zLjgxMy04LjUtOC41LTguNXptMCAxNS44ODZDNS4zMDMgMTYuMzg2IDEuOTkgMTMuMDcyIDEuOTkgOXMzLjMxMi03LjM4NSA3LjM4NS03LjM4NVMxNi43NiA0LjkyOCAxNi43NiA5YzAgNC4wNzItMy4zMTMgNy4zODYtNy4zODUgNy4zODZ6Ii8+PHBhdGggZD0iTTEyLjc1MyA4LjQ0M0g1Ljk5N2EuNTU4LjU1OCAwIDAwMCAxLjExNmg2Ljc1NmEuNTU4LjU1OCAwIDAwMC0xLjExNnoiLz48L2c+PC9zdmc+');\n opacity: 0.4;\n transition: all 0.3s;\n}\n.x6-widget-stencil.collapsable > .x6-widget-stencil-title:hover::before,\n.x6-widget-stencil-group.collapsable > .x6-widget-stencil-group-title:hover::before {\n opacity: 0.6;\n}\n.x6-widget-stencil.collapsable.collapsed > .x6-widget-stencil-title::before,\n.x6-widget-stencil-group.collapsable.collapsed > .x6-widget-stencil-group-title::before {\n background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNOS4zNzUuNUM0LjY4Ny41Ljg3NSA0LjMxMy44NzUgOWMwIDQuNjg4IDMuODEyIDguNSA4LjUgOC41IDQuNjg3IDAgOC41LTMuODEyIDguNS04LjUgMC00LjY4Ny0zLjgxMy04LjUtOC41LTguNXptMCAxNS44ODZDNS4zMDMgMTYuMzg2IDEuOTkgMTMuMDcyIDEuOTkgOXMzLjMxMi03LjM4NSA3LjM4NS03LjM4NVMxNi43NiA0LjkyOCAxNi43NiA5YzAgNC4wNzItMy4zMTMgNy4zODYtNy4zODUgNy4zODZ6Ii8+PHBhdGggZD0iTTEyLjc1MyA4LjQ0M0g1Ljk5N2EuNTU4LjU1OCAwIDAwMCAxLjExNmg2Ljc1NmEuNTU4LjU1OCAwIDAwMC0xLjExNnoiLz48cGF0aCBkPSJNOC44MTcgNS42MjN2Ni43NTZhLjU1OC41NTggMCAwMDEuMTE2IDBWNS42MjNhLjU1OC41NTggMCAxMC0xLjExNiAweiIvPjwvZz48L3N2Zz4=');\n opacity: 0.4;\n}\n.x6-widget-stencil.collapsable.collapsed > .x6-widget-stencil-title:hover::before,\n.x6-widget-stencil-group.collapsable.collapsed > .x6-widget-stencil-group-title:hover::before {\n opacity: 0.6;\n}\n.x6-widget-stencil input[type='search'] {\n -webkit-appearance: textfield;\n}\n.x6-widget-stencil input[type='search']::-webkit-search-cancel-button,\n.x6-widget-stencil input[type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n.x6-widget-stencil-search-text {\n display: block;\n width: 90%;\n margin: 8px 5%;\n padding-left: 8px;\n color: #333;\n background: #fff;\n border: 1px solid #e9e9e9;\n border-radius: 12px;\n outline: 0;\n}\n.x6-widget-stencil-search-text:focus {\n outline: 0;\n}\n.x6-widget-stencil::after {\n color: #808080;\n font-weight: 600;\n font-size: 12px;\n background: 0 0;\n}\n.x6-widget-transform {\n position: absolute;\n box-sizing: content-box !important;\n margin: -5px 0 0 -5px;\n padding: 4px;\n border: 1px dashed #000;\n border-radius: 5px;\n user-select: none;\n pointer-events: none;\n}\n.x6-widget-transform > div {\n position: absolute;\n box-sizing: border-box;\n background-color: #fff;\n border: 1px solid #000;\n transition: background-color 0.2s;\n pointer-events: auto;\n -webkit-user-drag: none;\n user-drag: none;\n /* stylelint-disable-line */\n}\n.x6-widget-transform > div:hover {\n background-color: #d3d3d3;\n}\n.x6-widget-transform-cursor-n {\n cursor: n-resize;\n}\n.x6-widget-transform-cursor-s {\n cursor: s-resize;\n}\n.x6-widget-transform-cursor-e {\n cursor: e-resize;\n}\n.x6-widget-transform-cursor-w {\n cursor: w-resize;\n}\n.x6-widget-transform-cursor-ne {\n cursor: ne-resize;\n}\n.x6-widget-transform-cursor-nw {\n cursor: nw-resize;\n}\n.x6-widget-transform-cursor-se {\n cursor: se-resize;\n}\n.x6-widget-transform-cursor-sw {\n cursor: sw-resize;\n}\n.x6-widget-transform-resize {\n width: 10px;\n height: 10px;\n border-radius: 6px;\n}\n.x6-widget-transform-resize[data-position='top-left'] {\n top: -5px;\n left: -5px;\n}\n.x6-widget-transform-resize[data-position='top-right'] {\n top: -5px;\n right: -5px;\n}\n.x6-widget-transform-resize[data-position='bottom-left'] {\n bottom: -5px;\n left: -5px;\n}\n.x6-widget-transform-resize[data-position='bottom-right'] {\n right: -5px;\n bottom: -5px;\n}\n.x6-widget-transform-resize[data-position='top'] {\n top: -5px;\n left: 50%;\n margin-left: -5px;\n}\n.x6-widget-transform-resize[data-position='bottom'] {\n bottom: -5px;\n left: 50%;\n margin-left: -5px;\n}\n.x6-widget-transform-resize[data-position='left'] {\n top: 50%;\n left: -5px;\n margin-top: -5px;\n}\n.x6-widget-transform-resize[data-position='right'] {\n top: 50%;\n right: -5px;\n margin-top: -5px;\n}\n.x6-widget-transform.prevent-aspect-ratio .x6-widget-transform-resize[data-position='top'],\n.x6-widget-transform.prevent-aspect-ratio .x6-widget-transform-resize[data-position='bottom'],\n.x6-widget-transform.prevent-aspect-ratio .x6-widget-transform-resize[data-position='left'],\n.x6-widget-transform.prevent-aspect-ratio .x6-widget-transform-resize[data-position='right'] {\n display: none;\n}\n.x6-widget-transform.no-orth-resize .x6-widget-transform-resize[data-position='bottom'],\n.x6-widget-transform.no-orth-resize .x6-widget-transform-resize[data-position='left'],\n.x6-widget-transform.no-orth-resize .x6-widget-transform-resize[data-position='right'],\n.x6-widget-transform.no-orth-resize .x6-widget-transform-resize[data-position='top'] {\n display: none;\n}\n.x6-widget-transform.no-resize .x6-widget-transform-resize {\n display: none;\n}\n.x6-widget-transform-rotate {\n top: -20px;\n left: -20px;\n width: 12px;\n height: 12px;\n border-radius: 6px;\n cursor: crosshair;\n}\n.x6-widget-transform.no-rotate .x6-widget-transform-rotate {\n display: none;\n}\n.x6-widget-transform-active {\n border-color: transparent;\n pointer-events: all;\n}\n.x6-widget-transform-active > div {\n display: none;\n}\n.x6-widget-transform-active > .x6-widget-transform-active-handle {\n display: block;\n background-color: #808080;\n}\n.x6-widget-knob {\n position: absolute;\n box-sizing: border-box;\n width: 16px;\n height: 16px;\n margin-top: -8px;\n margin-left: -8px;\n cursor: pointer;\n user-select: none;\n}\n.x6-widget-knob::before,\n.x6-widget-knob::after {\n position: absolute;\n transform: rotate(45deg);\n content: '';\n}\n.x6-widget-knob::before {\n top: 4px;\n left: 4px;\n box-sizing: border-box;\n width: 8px;\n height: 8px;\n background-color: #fff;\n}\n.x6-widget-knob::after {\n top: 5px;\n left: 5px;\n box-sizing: border-box;\n width: 6px;\n height: 6px;\n background-color: #fca000;\n}\n.x6-graph-print {\n position: relative;\n}\n.x6-graph-print .x6-graph-print-ready {\n display: none;\n}\n.x6-graph-print .x6-graph-print-preview {\n overflow: hidden !important;\n background: #fff !important;\n}\n@media print {\n html,\n html > body.x6-graph-printing {\n position: relative !important;\n width: 100% !important;\n height: 100% !important;\n margin: 0 !important;\n padding: 0 !important;\n }\n html > body.x6-graph-printing > * {\n display: none !important;\n }\n html > body.x6-graph-printing > .x6-graph-print {\n display: block !important;\n }\n .x6-graph-print {\n top: 0 !important;\n left: 0 !important;\n margin: 0 !important;\n padding: 0 !important;\n overflow: hidden !important;\n page-break-after: always;\n background: #fff !important;\n }\n .x6-graph-print .x6-graph-print-ready {\n display: none;\n }\n}\n.x6-cell-tool-editor {\n position: relative;\n display: inline-block;\n min-height: 1em;\n margin: 0;\n padding: 0;\n line-height: 1;\n white-space: normal;\n text-align: center;\n vertical-align: top;\n overflow-wrap: normal;\n outline: none;\n transform-origin: 0 0;\n -webkit-user-drag: none;\n}\n.x6-edge-tool-editor {\n border: 1px solid #275fc5;\n border-radius: 2px;\n}\n";var $A=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class zA extends jA{init(){Cw.autoInsertCSS&&zA.ensure()}dispose(){zA.clean()}}$A([zA.dispose()],zA.prototype,"dispose",null),function(t){let e,n=0;function i(){if(n+=1,!(n>1)&&!w.isApplyingHMR()){e=document.createElement("style"),e.setAttribute("type","text/css"),e.textContent=RA;const t=document.querySelector("head");t&&t.insertBefore(e,t.firstChild)}}function s(){n-=1,n>0||(e&&e.parentNode&&e.parentNode.removeChild(e),e=null)}t.ensure=i,t.clean=s}(zA||(zA={}));var IA,_A=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);sthis.addHandle(t))),"pie"===this.handleOptions.type){if(this.pie.toggles){const t=IA.pieToggle;this.$pieToggles={},this.pie.toggles.forEach((e=>{const n=this.$("
");this.applyAttrs(n,e.attrs),n.addClass(t).addClass(`${t}-pos-${e.position||"e"}`).attr("data-name",e.name).appendTo(this.container),this.$pieToggles[e.name]=n}))}this.setPieIcons()}if(this.$handleContainer){const t=this.handleOptions.type||"surround";this.$handleContainer.addClass(IA.wrap).addClass(IA.animate).addClass(`${IA.handle}-${t}`)}this.delegateEvents({[`mousedown .${IA.handle}`]:"onHandleMouseDown",[`touchstart .${IA.handle}`]:"onHandleMouseDown",[`mousedown .${IA.pieToggle}`]:"onPieToggleMouseDown",[`touchstart .${IA.pieToggle}`]:"onPieToggleMouseDown"})}onHandleMouseDown(t){const e=this.$(t.currentTarget).closest(`.${IA.handle}`).attr("data-action");e&&(t.preventDefault(),t.stopPropagation(),this.setEventData(t,{action:e,clientX:t.clientX,clientY:t.clientY,startX:t.clientX,startY:t.clientY}),"mousedown"===t.type&&2===t.button?this.triggerHandleAction(e,"contextmenu",t):(this.triggerHandleAction(e,"mousedown",t),this.delegateDocumentEvents({mousemove:"onHandleMouseMove",touchmove:"onHandleMouseMove",mouseup:"onHandleMouseUp",touchend:"onHandleMouseUp",touchcancel:"onHandleMouseUp"},t.data)))}onHandleMouseMove(t){const e=this.getEventData(t),n=e.action;n&&this.triggerHandleAction(n,"mousemove",t)}onHandleMouseUp(t){const e=this.getEventData(t),n=e.action;n&&(this.triggerHandleAction(n,"mouseup",t),this.undelegateDocumentEvents())}triggerHandleAction(t,e,n,i){n.preventDefault(),n.stopPropagation();const s=this.normalizeEvent(n),r=this.getEventData(s),o=this.graph.snapToGrid(s.clientX,s.clientY),a=this.graph.snapToGrid(r.clientX,r.clientY),l=o.x-a.x,c=o.y-a.y;this.trigger(`action:${t}:${e}`,Object.assign({e:s,dx:l,dy:c,x:o.x,y:o.y,offsetX:n.clientX-r.startX,offsetY:n.clientY-r.startY},i)),r.clientX=n.clientX,r.clientY=n.clientY}onPieToggleMouseDown(t){t.stopPropagation();const e=this.$(t.target).closest(`.${IA.pieToggle}`).attr("data-name");this.isOpen(e)||this.isOpen()&&this.toggleState(),this.toggleState(e)}setPieIcons(){"pie"===this.handleOptions.type&&this.$handleContainer.find(`.${IA.handle}`).each(((t,e)=>{const n=this.$(e),i=n.attr("data-action"),s=IA.pieSlice,r=this.getHandle(i);if(!r||!r.icon){const t=window.getComputedStyle(e,":before").getPropertyValue("content");if(t&&"none"!==t){const e=n.find(`.${s}-txt`);e.length&&rb.create(e[0]).text(t.replace(/['"]/g,""))}const i=n.css("background-image");if(i){const t=i.match(/url\(['"]?([^'"]+)['"]?\)/);if(t){const e=t[1],i=n.find(`.${s}-img`);i.length>0&&rb.create(i[0]).attr("xlink:href",e)}}}}))}getHandleIdx(t){return this.handles.findIndex((e=>e.name===t))}hasHandle(t){return this.getHandleIdx(t)>=0}getHandle(t){return this.handles.find((e=>e.name===t))}renderHandle(t){const e=this.$("
").addClass(`${IA.handle} ${IA.handle}-${t.name}`).attr("data-action",t.name).prop("draggable",!1);if("pie"===this.handleOptions.type){const n=this.getHandleIdx(t.name),i=this.pie,s=i.outerRadius,r=i.innerRadius,o=(s+r)/2,a=new jy(s,s),l=Ay.toRad(i.sliceAngle),c=n*l+Ay.toRad(i.startAngle),h=c+l,u=Ob(r,s,c,h),d=rb.create("svg").addClass(`${IA.pieSlice}-svg`),p=rb.create("path").addClass(IA.pieSlice).attr("d",u).translate(s,s),g=jy.fromPolar(o,-c-l/2,a).toJSON(),f=i.iconSize,m=rb.create("image").attr(g).addClass(`${IA.pieSlice}-img`);g.y=g.y+f-2;const y=rb.create("text",{"font-size":f}).attr(g).addClass(`${IA.pieSlice}-txt`);m.attr({width:f,height:f}),m.translate(-f/2,-f/2),y.translate(-f/2,-f/2),d.append([p,m,y]),e.append(d.node)}else e.addClass(`${IA.handle}-pos-${t.position}`),t.content&&("string"===typeof t.content?e.html(t.content):e.append(t.content));return this.updateHandleIcon(e,t.icon),this.applyAttrs(e,t.attrs),e}addHandle(t){if(!this.hasHandle(t.name)){this.handles.push(t);const e=t.events;e&&Object.keys(e).forEach((n=>{const i=e[n],s=`action:${t.name}:${n}`;"string"===typeof i?this.on(s,this[i],this):this.on(s,i)})),this.$handleContainer&&this.$handleContainer.append(this.renderHandle(t))}return this}addHandles(t){return t.forEach((t=>this.addHandle(t))),this}removeHandles(){while(this.handles.length)this.removeHandle(this.handles[0].name);return this}removeHandle(t){const e=this.getHandleIdx(t),n=this.handles[e];return n&&(n.events&&Object.keys(n.events).forEach((e=>{this.off(`action:${t}:${e}`)})),this.getHandleElem(t).remove(),this.handles.splice(e,1)),this}changeHandle(t,e){const n=this.getHandle(t);return n&&(this.removeHandle(t),this.addHandle(Object.assign(Object.assign({},n),e))),this}toggleHandle(t,e){const n=this.getHandle(t);if(n){const i=this.getHandleElem(t),s=`${IA.handle}-selected`;void 0===e&&(e=!i.hasClass(s)),i.toggleClass(s,e);const r=e?n.iconSelected:n.icon;r&&this.updateHandleIcon(i,r)}return this}selectHandle(t){return this.toggleHandle(t,!0)}deselectHandle(t){return this.toggleHandle(t,!1)}deselectAllHandles(){return this.handles.forEach((t=>this.deselectHandle(t.name))),this}getHandleElem(t){return this.$handleContainer.find(`.${IA.handle}-${t}`)}updateHandleIcon(t,e){if("pie"===this.handleOptions.type){const n=t.find(`.${IA.pieSliceImg}`);this.$(n[0]).attr("xlink:href",e||"")}else t.css("background-image",e?`url(${e})`:"")}isRendered(){return null!=this.$handleContainer}isOpen(t){return!!this.isRendered()&&(t?this.$pieToggles[t].hasClass(IA.pieToggleOpened):this.$handleContainer.hasClass(`${IA.pieOpended}`))}toggleState(t){if(this.isRendered()){const e=this.$handleContainer;if(Object.keys(this.$pieToggles).forEach((t=>{const e=this.$pieToggles[t];e.removeClass(IA.pieToggleOpened)})),this.isOpen())this.trigger("pie:close",{name:t}),e.removeClass(IA.pieOpended);else{if(this.trigger("pie:open",{name:t}),t){const n=this.pie.toggles,i=n&&n.find((e=>e.name===t));i&&e.attr({"data-pie-toggle-name":i.name,"data-pie-toggle-position":i.position}),this.$pieToggles[t].addClass(IA.pieToggleOpened)}e.addClass(IA.pieOpended)}}}applyAttrs(t,e){if(e){const n=Ex.$(t);Object.keys(e).forEach((t=>{const i=n.find(t).addBack().filter(t),s=e[t],{class:r}=s,o=_A(s,["class"]);r&&i.addClass(r),i.attr(o)}))}}}(function(t){t.defaultPieOptions={innerRadius:20,outerRadius:50,sliceAngle:45,startAngle:0,iconSize:14,toggles:[{name:"default",position:"e"}]}})(VA||(VA={})),function(t){t.handle=Ex.prototype.prefixClassName("widget-handle"),t.wrap=`${t.handle}-wrap`,t.animate=`${t.handle}-animate`,t.pieOpended=`${t.handle}-pie-opened`,t.pieToggle=`${t.handle}-pie-toggle`,t.pieToggleOpened=`${t.handle}-pie-toggle-opened`,t.pieSlice=`${t.handle}-pie-slice`,t.pieSliceImg=`${t.handle}-pie-slice-img`}(IA||(IA={}));var GA,HA=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},UA=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{const e=n[t];e&&e.remove()}))}static getInstances(t){const e=this.ensureCache();return e[t.view.cid]||{}}init(t){}render(){return this}startListening(){!1!==this.options.clearOnBlankMouseDown&&this.graph.on("blank:mousedown",this.remove,this)}stopListening(){!1!==this.options.clearOnBlankMouseDown&&this.graph.off("blank:mousedown",this.remove,this)}remove(){this.stopListening();const t=this.constructor;return t.unregister(this),super.remove()}dispose(){this.remove()}}qA.instanceCache=new WeakMap,HA([Ex.dispose()],qA.prototype,"dispose",null);class WA extends qA{get node(){return this.cell}get metadata(){const t=this.cell.prop("knob");return Array.isArray(t)?null!=this.options.index?t[this.options.index]:null:t}init(t){this.options=Object.assign({},t),this.render(),this.startListening()}startListening(){this.delegateEvents({mousedown:"onMouseDown",touchstart:"onMouseDown"}),this.model.on("*",this.update,this),this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this),this.model.on("reseted",this.remove,this),this.node.on("removed",this.remove,this),this.view.on("node:resize:mousedown",this.onTransform,this),this.view.on("node:rotate:mousedown",this.onTransform,this),this.view.on("node:resize:mouseup",this.onTransformed,this),this.view.on("node:rotate:mouseup",this.onTransformed,this),this.view.on("cell:knob:mousedown",this.onKnobMouseDown,this),this.view.on("cell:knob:mouseup",this.onKnobMouseUp,this),super.startListening()}stopListening(){this.undelegateEvents(),this.model.off("*",this.update,this),this.graph.off("scale",this.update,this),this.graph.off("translate",this.update,this),this.model.off("reseted",this.remove,this),this.node.off("removed",this.remove,this),this.view.off("node:resize:mousedown",this.onTransform,this),this.view.off("node:rotate:mousedown",this.onTransform,this),this.view.off("node:resize:mouseup",this.onTransformed,this),this.view.off("node:rotate:mouseup",this.onTransformed,this),this.view.off("cell:knob:mousedown",this.onKnobMouseDown,this),this.view.off("cell:knob:mouseup",this.onKnobMouseUp,this),super.stopListening()}render(){return this.container=document.createElement("div"),jm(this.container,this.prefixClassName("widget-knob")),this.options.className&&jm(this.container,this.options.className),this.view.addClass(GA.KNOB),this.graph.container.appendChild(this.container),this.update(),this}remove(){return this.view.removeClass(GA.KNOB),super.remove()}update(){if(this.metadata){const{update:t,position:e}=this.metadata,n={knob:this,cell:this.cell,node:this.node};if(e){const t=e.call(this.graph,Object.assign({},n));if(t){const e=this.graph.matrix(),n=this.node.getBBox(),i=Ay.normalize(this.node.getAngle()),s=jy.create(t);0!==i&&s.rotate(-i,{x:n.width/2,y:n.height/2}),s.translate(n).scale(e.a,e.d).translate(e.e,e.f),this.container.style.left=`${s.x}px`,this.container.style.top=`${s.y}px`}}t&&t.call(this.graph,Object.assign({},n))}}hide(){this.container.style.display="none"}show(){this.container.style.display=""}onTransform(){this.hide()}onTransformed(){this.show()}onKnobMouseDown({knob:t}){this.cid!==t.cid&&this.hide()}onKnobMouseUp(){this.show()}notify(t,e){if(this.view){const n=this.view.normalizeEvent(e),i=this.graph.snapToGrid(n.clientX,n.clientY);this.view.notify(`cell:${t}`,{e:n,view:this.view,node:this.node,cell:this.cell,x:i.x,y:i.y,knob:this}),this.cell.isNode()?this.view.notify(`node:${t}`,{e:n,view:this.view,node:this.node,cell:this.cell,x:i.x,y:i.y,knob:this}):this.cell.isEdge()&&this.view.notify(`edge:${t}`,{e:n,view:this.view,edge:this.cell,cell:this.cell,x:i.x,y:i.y,knob:this})}}onMouseDown(t){t.stopPropagation(),this.setEventData(t,{knobbing:!1,originX:t.clientX,originY:t.clientY,clientX:t.clientX,clientY:t.clientY}),this.graph.view.undelegateEvents(),this.delegateDocumentEvents(GA.documentEvents,t.data),this.metadata&&this.metadata.onMouseDown&&this.metadata.onMouseDown.call(this.graph,{e:t,data:this.getEventData(t),knob:this,cell:this.cell,node:this.node}),this.notify("knob:mousedown",t)}onMouseMove(t){const e=this.getEventData(t),n=this.graph.findViewByCell(this.node);if(e.knobbing||(e.knobbing=!0,n&&(n.addClass(GA.KNOBBING),this.notify("knob",t)),this.model.startBatch("knob",{cid:this.cid})),e.clientX=t.clientX,e.clientY=t.clientY,this.metadata&&this.metadata.onMouseMove){const n=this.graph.matrix(),i=(t.clientX-e.originX)/n.a,s=(t.clientY-e.originY)/n.d,r=this.node.getAngle(),o=new jy(i,s).rotate(r);this.metadata.onMouseMove.call(this.graph,{e:t,data:e,deltaX:o.x,deltaY:o.y,knob:this,cell:this.cell,node:this.node})}this.notify("knobbing",t),this.notify("knob:mousemove",t)}onMouseUp(t){this.undelegateDocumentEvents(),this.graph.view.delegateEvents();const e=this.getEventData(t),n=this.graph.findViewByCell(this.node);e.knobbing&&(n&&n.removeClass(GA.KNOBBING),this.metadata&&this.metadata.onMouseUp&&this.metadata.onMouseUp.call(this.graph,{e:t,data:e,knob:this,cell:this.cell,node:this.node}),this.model.stopBatch("knob",{cid:this.cid}),this.notify("knobbed",t)),this.notify("knob:mouseup",t)}}(function(t){t.KNOB="has-widget-knob",t.KNOBBING="node-knobbing",t.documentEvents={mousemove:"onMouseMove",touchmove:"onMouseMove",mouseup:"onMouseUp",touchend:"onMouseUp"}})(GA||(GA={}));var XA,YA,JA=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};(function(t){t.root="widget-minimap",t.viewport=`${t.root}-viewport`,t.zoom=`${t.viewport}-zoom`})(XA||(XA={}));class ZA extends Ex{constructor(t){super(),this.options=Object.assign(Object.assign({},YA.defaultOptions),t),this.updateViewport=mm(this.updateViewport.bind(this),0),this.container=document.createElement("div"),this.$container=this.$(this.container).addClass(this.prefixClassName(XA.root));const e=document.createElement("div");this.container.appendChild(e),this.$viewport=this.$("
").addClass(this.prefixClassName(XA.viewport)),this.options.scalable&&(this.zoomHandle=this.$("
").addClass(this.prefixClassName(XA.zoom)).appendTo(this.$viewport).get(0)),this.$container.append(this.$viewport).css({width:this.options.width,height:this.options.height,padding:this.options.padding}),this.options.container&&this.options.container.appendChild(this.container),this.sourceGraph=this.graph;const n=Object.assign(Object.assign({},this.options.graphOptions),{container:e,model:this.sourceGraph.model,frozen:!0,async:this.sourceGraph.isAsync(),interacting:!1,grid:!1,background:!1,rotating:!1,resizing:!1,embedding:!1,selecting:!1,snapline:!1,clipboard:!1,history:!1,scroller:!1});this.targetGraph=this.options.createGraph?this.options.createGraph(n):new hk(n),this.targetGraph.renderer.unfreeze(),this.updatePaper(this.sourceGraph.options.width,this.sourceGraph.options.height),this.startListening()}get graph(){return this.options.graph}get scroller(){return this.graph.scroller.widget}get graphContainer(){return this.scroller?this.scroller.container:this.graph.container}get $graphContainer(){return this.scroller?this.scroller.$container:this.$(this.graph.container)}startListening(){this.scroller?this.$graphContainer.on(`scroll${this.getEventNamespace()}`,this.updateViewport):(this.sourceGraph.on("translate",this.onSourceGraphTransform,this),this.sourceGraph.on("scale",this.onSourceGraphTransform,this)),this.sourceGraph.on("resize",this.updatePaper,this),this.delegateEvents({mousedown:"startAction",touchstart:"startAction",[`mousedown .${this.prefixClassName("graph")}`]:"scrollTo",[`touchstart .${this.prefixClassName("graph")}`]:"scrollTo"})}stopListening(){this.scroller?this.$graphContainer.off(this.getEventNamespace()):(this.sourceGraph.off("translate",this.onSourceGraphTransform,this),this.sourceGraph.off("scale",this.onSourceGraphTransform,this)),this.sourceGraph.off("resize",this.updatePaper,this),this.undelegateEvents()}onRemove(){this.targetGraph.view.remove(),this.stopListening(),this.targetGraph.dispose()}onSourceGraphTransform(){this.targetGraphTransforming?this.updateViewport():this.updatePaper(this.sourceGraph.options.width,this.sourceGraph.options.height)}updatePaper(t,e){let n,i;"object"===typeof t?(n=t.width,i=t.height):(n=t,i=e);const s=this.sourceGraph.options,r=this.sourceGraph.transform.getScale(),o=this.options.width-2*this.options.padding,a=this.options.height-2*this.options.padding;n/=r.sx,i/=r.sy,this.ratio=Math.min(o/n,a/i);const l=this.ratio,c=s.x*l/r.sx,h=s.y*l/r.sy;return n*=l,i*=l,this.targetGraph.resizeGraph(n,i),this.targetGraph.translate(c,h),this.targetGraph.scale(l,l),this.updateViewport(),this}updateViewport(){const t=this.ratio,e=this.sourceGraph.transform.getScale();let n=null;if(this.scroller)n=this.scroller.clientToLocalPoint(0,0);else{const t=this.sourceGraph.matrix();n=new jy(-t.e/t.a,-t.f/t.d)}const i=this.$(this.targetGraph.container).position(),s=this.targetGraph.translate();s.ty=s.ty||0,this.geometry={top:i.top+n.y*t+s.ty,left:i.left+n.x*t+s.tx,width:this.$graphContainer.innerWidth()*t/e.sx,height:this.$graphContainer.innerHeight()*t/e.sy},this.$viewport.css(this.geometry)}startAction(t){const e=this.normalizeEvent(t),n=e.target===this.zoomHandle?"zooming":"panning",{tx:i,ty:s}=this.sourceGraph.translate(),r={action:n,clientX:e.clientX,clientY:e.clientY,scrollLeft:this.graphContainer.scrollLeft,scrollTop:this.graphContainer.scrollTop,zoom:this.sourceGraph.zoom(),scale:this.sourceGraph.transform.getScale(),geometry:this.geometry,translateX:i,translateY:s};this.targetGraphTransforming=!0,this.delegateDocumentEvents(YA.documentEvents,r)}doAction(t){const e=this.normalizeEvent(t),n=e.clientX,i=e.clientY,s=e.data;switch(s.action){case"panning":{const t=this.sourceGraph.transform.getScale(),e=(n-s.clientX)*t.sx,r=(i-s.clientY)*t.sy;this.scroller?(this.graphContainer.scrollLeft=s.scrollLeft+e/this.ratio,this.graphContainer.scrollTop=s.scrollTop+r/this.ratio):this.sourceGraph.translate(s.translateX-e/this.ratio,s.translateY-r/this.ratio);break}case"zooming":{const t=s.scale,e=s.geometry,i=1+(s.clientX-n)/e.width/t.sx;s.frameId&&cancelAnimationFrame(s.frameId),s.frameId=requestAnimationFrame((()=>{this.sourceGraph.zoom(i*s.zoom,{absolute:!0,minScale:this.options.minScale,maxScale:this.options.maxScale})}));break}default:break}}stopAction(){this.undelegateDocumentEvents(),this.targetGraphTransforming=!1}scrollTo(t){const e=this.normalizeEvent(t);let n,i;const s=this.targetGraph.translate();if(s.ty=s.ty||0,null==e.offsetX){const t=this.$(this.targetGraph.container).offset();n=e.pageX-t.left,i=e.pageY-t.top}else n=e.offsetX,i=e.offsetY;const r=(n-s.tx)/this.ratio,o=(i-s.ty)/this.ratio;this.sourceGraph.centerPoint(r,o)}dispose(){this.remove()}}JA([Ex.dispose()],ZA.prototype,"dispose",null),function(t){t.defaultOptions={width:300,height:200,padding:10,scalable:!0,minScale:.01,maxScale:16,graphOptions:{},createGraph:t=>new hk(t)},t.documentEvents={mousemove:"doAction",touchmove:"doAction",mouseup:"stopAction",touchend:"stopAction"}}(YA||(YA={}));var KA=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},QA=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{"string"===typeof t?this.filterShapes[t]=!0:this.filterCells[t.id]=!0})):"function"===typeof t&&(this.filterFunction=t)}onBatchStop({name:t,data:e}){"resize"===t&&this.snapOnResizing(e.cell,e)}captureCursorOffset({view:t,x:e,y:n}){const i=t.getDelegatedView();if(i&&this.isNodeMovable(i)){const i=t.cell.getPosition();this.offset={x:e-i.x,y:n-i.y}}}isNodeMovable(t){return t&&t.cell.isNode()&&t.can("nodeMovable")}snapOnResizing(t,e){if(this.options.resizing&&!e.snapped&&e.ui&&e.direction&&e.trueDirection){const n=this.graph.renderer.findViewByCell(t);if(n&&n.cell.isNode()){const i=t.getBBox(),s=i.bbox(t.getAngle()),r=s.getTopLeft(),o=s.getBottomRight(),a=Ay.normalize(t.getAngle()),l=this.options.tolerance||0;let c,h,u,d,p,g;const f={vertical:0,horizontal:0},m=e.direction,y=e.trueDirection,b=e.relativeDirection;-1!==y.indexOf("right")?f.vertical=o.x:f.vertical=r.x,-1!==y.indexOf("bottom")?f.horizontal=o.y:f.horizontal=r.y,this.model.getNodes().some((e=>{if(this.isIgnored(t,e))return!1;const n=e.getBBox().bbox(e.getAngle()),i=n.getTopLeft(),r=n.getBottomRight(),a={vertical:[i.x,r.x],horizontal:[i.y,r.y]},m={};return Object.keys(a).forEach((t=>{const e=t,n=a[e].map((t=>({position:t,distance:Math.abs(t-f[e])}))).filter((t=>t.distance<=l));m[e]=Ha(n,(t=>t.distance))})),null==c&&m.vertical.length>0&&(c=m.vertical[0].position,h=Math.min(s.y,n.y),u=Math.max(o.y,r.y)-h),null==d&&m.horizontal.length>0&&(d=m.horizontal[0].position,p=Math.min(s.x,n.x),g=Math.max(o.x,r.x)-p),null!=c&&null!=d})),this.hide();let v=0,C=0;null==d&&null==c||(null!=c&&(v=-1!==y.indexOf("right")?c-o.x:r.x-c),null!=d&&(C=-1!==y.indexOf("bottom")?d-o.y:r.y-d));let w=0,x=0;if(a%90===0)90===a||270===a?(w=C,x=v):(w=v,x=C);else{const t=a>=0&&a<90?1:a>=90&&a<180?4:a>=180&&a<270?3:2;null!=d&&null!=c&&(vE&&(S=Math.max(S,e.minWidth)),e.minHeight&&e.minHeight>E&&(A=Math.max(A,e.minHeight)),e.maxWidth&&(S=Math.min(S,e.maxWidth)),e.maxHeight&&(A=Math.min(A,e.maxHeight)),e.preserveAspectRatio&&(x1&&Math.abs(M.width+M.x-c)>1&&(c=void 0),d&&Math.abs(M.y-d)>1&&Math.abs(M.height+M.y-d)>1&&(d=void 0),this.update({verticalLeft:c,verticalTop:h,verticalHeight:u,horizontalTop:d,horizontalLeft:p,horizontalWidth:g})}}}snapOnMoving({view:t,e:e,x:n,y:i}){const s=t.getEventData(e).delegatedView||t;if(!this.isNodeMovable(s))return;const r=s.cell,o=r.getSize(),a=r.getPosition(),l=new Ly(n-this.offset.x,i-this.offset.y,o.width,o.height),c=r.getAngle(),h=l.getCenter(),u=l.bbox(c),d=u.getTopLeft(),p=u.getBottomRight(),g=this.options.tolerance||0;let f,m,y,b,v,C,w=0,x=0;if(this.model.getNodes().some((t=>{if(this.isIgnored(r,t))return!1;const e=t.getBBox().bbox(t.getAngle()),n=e.getCenter(),i=e.getTopLeft(),s=e.getBottomRight();return null==f&&(Math.abs(n.x-h.x)0&&(this.timer=window.setTimeout((()=>{this.unmount()}),e)),this}onRemove(){this.stopListening(),this.hide()}dispose(){this.remove()}}KA([Ex.dispose()],tM.prototype,"dispose",null);var eM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class nM extends jA{init(){this.resetUpdates(),this.startListening(),this.resetViews(this.model.getCells()),!this.isFrozen()&&this.isAsync()&&this.updateViewsAsync()}startListening(){this.model.on("sorted",this.onSortModel,this),this.model.on("reseted",this.onModelReseted,this),this.model.on("batch:stop",this.onBatchStop,this),this.model.on("cell:added",this.onCellAdded,this),this.model.on("cell:removed",this.onCellRemoved,this),this.model.on("cell:change:zIndex",this.onCellZIndexChanged,this),this.model.on("cell:change:visible",this.onCellVisibleChanged,this)}stopListening(){this.model.off("sorted",this.onSortModel,this),this.model.off("reseted",this.onModelReseted,this),this.model.off("batch:stop",this.onBatchStop,this),this.model.off("cell:added",this.onCellAdded,this),this.model.off("cell:removed",this.onCellRemoved,this),this.model.off("cell:change:zIndex",this.onCellZIndexChanged,this),this.model.off("cell:change:visible",this.onCellVisibleChanged,this)}resetUpdates(){this.updates={priorities:[{},{},{}],mounted:{},mountedCids:[],unmounted:{},unmountedCids:[],count:0,sort:!1,frozen:!1,freezeKey:null,animationId:null}}onSortModel(){this.model.hasActiveBatch(nM.SORT_DELAYING_BATCHES)||this.sortViews()}onModelReseted({options:t}){this.removeZPivots(),this.resetViews(this.model.getCells(),t)}onBatchStop({name:t,data:e}){if(this.isFrozen())return;const n=this.model;if(!this.isAsync()){const i=nM.UPDATE_DELAYING_BATCHES;i.includes(t)&&!n.hasActiveBatch(i)&&this.updateViews(e)}const i=nM.SORT_DELAYING_BATCHES;i.includes(t)&&!n.hasActiveBatch(i)&&this.sortViews()}onCellAdded({cell:t,options:e}){const n=e.position;this.isAsync()||"number"!==typeof n?this.renderView(t,e):(e.maxPosition===n&&this.freeze({key:"addCells"}),this.renderView(t,e),0===n&&this.unfreeze({key:"addCells"}))}onCellRemoved({cell:t,options:e}){const n=this.findViewByCell(t);n&&this.requestViewUpdate(n,nM.FLAG_REMOVE,n.priority,e)}onCellZIndexChanged({cell:t,options:e}){if("approx"===this.options.sorting){const n=this.findViewByCell(t);n&&this.requestViewUpdate(n,nM.FLAG_INSERT,n.priority,e)}}onCellVisibleChanged({cell:t,current:e,options:n}){e||this.processEdgeOnTerminalVisibleChanged(t,!1);const i=this.findViewByCell(t);!e&&i?this.removeView(t):e&&null==i&&this.renderView(t,n),e&&this.processEdgeOnTerminalVisibleChanged(t,!0)}processEdgeOnTerminalVisibleChanged(t,e){const n=(t,e)=>{const n=t.getSourceCellId();if(n!==e.id)return t.getSourceCell();const i=t.getTargetCellId();return i!==e.id?t.getTargetCell():null};this.model.getConnectedEdges(t).forEach((i=>{const s=n(i,t);(null==s||s.isVisible())&&(e?i.show():i.hide())}))}isEdgeTerminalVisible(t,e){const n="source"===e?t.getSourceCellId():t.getTargetCellId(),i=n?this.model.getCell(n):null;return!(i&&!i.isVisible())}requestConnectedEdgesUpdate(t,e={}){if(Rx.isCellView(t)){const n=t.cell,i=this.model.getConnectedEdges(n);for(let t=0,s=i.length;t=i){s=!1;break t}const p=Ex.views[n];if(!p){delete d[n];continue}let g=d[n];if(0===(g&nM.FLAG_REMOVE)){const t=n in e.unmounted;if(h&&!Em(h,this.graph,{view:p,unmounted:t})){t||(this.registerUnmountedView(p),p.unmount()),e.unmounted[n]|=g,delete d[n],a+=1;continue}t&&(g|=nM.FLAG_INSERT,o+=1),g|=this.registerMountedView(p)}const f=p;let m=this.updateView(p,g,t);if(m>0){const t=f.cell;t&&t.isEdge()&&(f.hasAction(m,"source")&&!this.isEdgeTerminalVisible(t,"source")&&(m=f.removeAction(m,"source"),m|=nM.FLAG_REMOVE),f.hasAction(m,"target")&&!this.isEdgeTerminalVisible(t,"target")&&(m=f.removeAction(m,"target"),m|=nM.FLAG_REMOVE))}m>0&&(d[n]=m,!this.graph.hook.onViewPostponed(f,m,t)||d[n])?(c+=1,s=!1):(r>u&&(r=u),l+=1,delete d[n])}}return{empty:s,priority:r,mountedCount:o,unmountedCount:a,updatedCount:l,postponedCount:c}}updateViewsAsync(t={},e={processed:0,priority:nM.MIN_PRIORITY}){const n=this.updates,i=n.animationId;if(i){if(Ey(i),0===e.processed){const e=t.before;"function"===typeof e&&Em(e,this.graph,this.graph)}const s=this.updateViewsBatch(t),r=this.checkViewImpl({checkView:t.checkView,mountedBatchSize:nM.MOUNT_BATCH_SIZE-s.mountedCount,unmountedBatchSize:nM.MOUNT_BATCH_SIZE-s.unmountedCount});let o=e.processed;const a=n.count,l=r.mountedCount,c=r.unmountedCount;s.updatedCount>0&&(o+=s.updatedCount+s.unmountedCount,e.priority=Math.min(s.priority,e.priority),s.empty&&0===l?(s.priority=e.priority,s.mountedCount+=l,s.unmountedCount+=c,this.graph.trigger("render:done",{stats:s,options:t}),e.processed=0,n.count=0):e.processed=o);const h=t.progress;if(a&&"function"===typeof h&&Em(h,this.graph,{total:a,done:s.empty,current:o}),n.animationId!==i)return}n.animationId=xy((()=>{this.updateViewsAsync(t,e)}))}registerMountedView(t){const e=t.cid,n=this.updates;if(e in n.mounted)return 0;n.mounted[e]=!0,n.mountedCids.push(e);const i=n.unmounted[e]||0;return delete n.unmounted[e],i}registerUnmountedView(t){const e=t.cid,n=this.updates;if(e in n.unmounted)return 0;n.unmounted[e]|=nM.FLAG_INSERT;const i=n.unmounted[e];return n.unmountedCids.push(e),delete n.mounted[e],i}isViewMounted(t){if(null==t)return!1;const e=t.cid;return e in this.updates.mounted}getMountedViews(){return Object.keys(this.updates.mounted).map((t=>Rx.views[t]))}getUnmountedViews(){return Object.keys(this.updates.unmounted).map((t=>Rx.views[t]))}checkMountedViews(t,e){let n=0;if("function"!==typeof t)return n;const i=this.updates,s=i.mounted,r=i.mountedCids,o=null==e?r.length:Math.min(r.length,e);for(let a=0;a0?Math.min(this.updates.unmountedCids.length-n,t.mountedBatchSize):t.mountedBatchSize);return{mountedCount:i,unmountedCount:n}}checkView(t={}){return this.checkViewImpl(t)}isFrozen(){return!!this.options.frozen}freeze(t={}){const e=t.key,n=this.updates,i=this.options.frozen,s=n.freezeKey;if(e&&e!==s){if(i&&s)return;n.frozen=i,n.freezeKey=e}this.options.frozen=!0;const r=n.animationId;n.animationId=null,this.isAsync()&&null!=r&&Ey(r),this.graph.trigger("freeze",{key:e})}unfreeze(t={}){const e=t.key,n=this.updates,i=n.freezeKey;if(e&&i&&e!==i)return;if(n.freezeKey=null,e&&e===i&&n.frozen)return;const s=()=>{this.options.frozen=n.frozen=!1,n.sort&&(this.sortViews(),n.sort=!1);const i=t.after;i&&Em(i,this.graph,this.graph),this.graph.trigger("unfreeze",{key:e})};if(this.isAsync()){this.freeze();const e=t.progress;this.updateViewsAsync(Object.assign(Object.assign({},t),{progress:({done:t,current:n,total:i})=>{e&&Em(e,this.graph,{done:t,current:n,total:i}),t&&s()}}))}else this.updateViews(t),s()}isAsync(){return!!this.options.async}setAsync(t){this.options.async=t}onRemove(){this.freeze(),this.removeViews()}resetViews(t=[],e={}){this.resetUpdates(),this.removeViews(),this.freeze({key:"reset"});for(let n=0,i=t.length;n{const e=this.views[t];e&&this.removeView(e.cell)})),this.views={}}renderView(t,e={}){const n=t.id,i=this.views;let s=0,r=i[n];if(t.isVisible()&&(!t.isEdge()||this.isEdgeTerminalVisible(t,"source")&&this.isEdgeTerminalVisible(t,"target"))){if(r)s=nM.FLAG_INSERT;else{const e=this.graph.hook.createCellView(t);e&&(r=i[t.id]=e,r.graph=this.graph,s=this.registerUnmountedView(r)|r.getBootstrapFlag())}r&&this.requestViewUpdate(r,s,r.priority,e)}}isExactSorting(){return"exact"===this.options.sorting}sortViews(){this.isExactSorting()&&(this.isFrozen()?this.updates.sort=!0:this.sortViewsExact())}sortElements(t,e){const n=t.map((t=>{const e=t.parentNode,n=e.insertBefore(document.createTextNode(""),t.nextSibling);return t=>{if(e===t)throw new Error("You can't sort elements if any one is a descendant of another.");e.insertBefore(t,n),e.removeChild(n)}}));t.sort(e).forEach(((t,e)=>n[e](t)))}sortViewsExact(){const t=this.view.$(this.view.stage).children("[data-cell-id]").toArray(),e=this.model;this.sortElements(t,((t,n)=>{const i=e.getCell(t.getAttribute("data-cell-id")||""),s=e.getCell(n.getAttribute("data-cell-id")||""),r=i.getZIndex()||0,o=s.getZIndex()||0;return r===o?0:ri&&(i=e)}const s=this.view.stage;if(i!==-1/0){const t=e[i];s.insertBefore(n,t.nextSibling)}else s.insertBefore(n,s.firstChild);return n}removeZPivots(){this.zPivots&&Object.keys(this.zPivots).forEach((t=>{const e=this.zPivots[t];e&&e.parentNode&&e.parentNode.removeChild(e)})),this.zPivots={}}insertView(t){const e=this.view.stage;switch(this.options.sorting){case"approx":{const n=t.cell.getZIndex(),i=this.addZPivot(n);e.insertBefore(t.container,i);break}case"exact":default:e.appendChild(t.container);break}}findViewByCell(t){if(null==t)return null;const e=ZS.isCell(t)?t.id:t;return this.views[e]}findViewByElem(t){if(null==t)return null;const e="string"===typeof t?this.view.stage.querySelector(t):t instanceof Element?t:t[0];if(e){const t=this.view.findAttr("data-cell-id",e);if(t)return this.views[t]}return null}findViewsFromPoint(t){const e={x:t.x,y:t.y};return this.model.getCells().map((t=>this.findViewByCell(t))).filter((t=>null!=t&&Yb(t.container,{target:this.view.stage}).containsPoint(e)))}findEdgeViewsInArea(t,e={}){const n=Ly.create(t);return this.model.getEdges().map((t=>this.findViewByCell(t))).filter((t=>{if(t){const i=Yb(t.container,{target:this.view.stage});return 0===i.width?i.inflate(1,0):0===i.height&&i.inflate(0,1),e.strict?n.containsRect(i):n.isIntersectWithRect(i)}return!1}))}findViewsInArea(t,e={}){const n=Ly.create(t);return this.model.getNodes().map((t=>this.findViewByCell(t))).filter((t=>{if(t){const i=Yb(t.container,{target:this.view.stage});return e.strict?n.containsRect(i):n.isIntersectWithRect(i)}return!1}))}dispose(){this.resetUpdates(),this.stopListening()}}eM([jA.dispose()],nM.prototype,"dispose",null),function(t){t.FLAG_INSERT=1<<30,t.FLAG_REMOVE=1<<29,t.MOUNT_BATCH_SIZE=1e3,t.UPDATE_BATCH_SIZE=1e3,t.MIN_PRIORITY=2,t.SORT_DELAYING_BATCHES=["add","to-front","to-back"],t.UPDATE_DELAYING_BATCHES=["translate"]}(nM||(nM={}));var iM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class sM extends jA{get elem(){return this.view.background}init(){this.startListening(),this.options.background&&this.draw(this.options.background)}startListening(){this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this)}stopListening(){this.graph.off("scale",this.update,this),this.graph.off("translate",this.update,this)}updateBackgroundImage(t={}){let e=t.size||"auto auto",n=t.position||"center";const i=this.graph.transform.getScale(),s=this.graph.translate();if("object"===typeof n){const t=s.tx+i.sx*(n.x||0),e=s.ty+i.sy*(n.y||0);n=`${t}px ${e}px`}"object"===typeof e&&(e=Ly.fromSize(e).scale(i.sx,i.sy),e=`${e.width}px ${e.height}px`),this.elem.style.backgroundSize=e,this.elem.style.backgroundPosition=n}drawBackgroundImage(t,e={}){if(!(t instanceof HTMLImageElement))return void(this.elem.style.backgroundImage="");const n=this.optionsCache;if(n&&n.image!==e.image)return;let i;const s=e.opacity,r=e.size;let o=e.repeat||"no-repeat";const a=vw.registry.get(o);if("function"===typeof a){const n=e.quality||1;t.width*=n,t.height*=n;const s=a(t,e);if(!(s instanceof HTMLCanvasElement))throw new Error("Background pattern must return an HTML Canvas instance");i=s.toDataURL("image/png"),o=e.repeat&&o!==e.repeat?e.repeat:"repeat","object"===typeof r?(r.width*=s.width/t.width,r.height*=s.height/t.height):void 0===r&&(e.size={width:s.width/n,height:s.height/n})}else i=t.src,void 0===r&&(e.size={width:t.width,height:t.height});null!=n&&"object"===typeof e.size&&e.image===n.image&&e.repeat===n.repeat&&e.quality===n.quality&&(n.size=Eu(e.size));const l=this.elem.style;l.backgroundImage=`url(${i})`,l.backgroundRepeat=o,l.opacity=null==s||s>=1?"":`${s}`,this.updateBackgroundImage(e)}updateBackgroundColor(t){this.elem.style.backgroundColor=t||""}updateBackgroundOptions(t){this.graph.options.background=t}update(){this.optionsCache&&this.updateBackgroundImage(this.optionsCache)}draw(t){const e=t||{};if(this.updateBackgroundOptions(t),this.updateBackgroundColor(e.color),e.image){this.optionsCache=Eu(e);const n=document.createElement("img");n.onload=()=>this.drawBackgroundImage(n,t),n.setAttribute("crossorigin","anonymous"),n.src=e.image}else this.drawBackgroundImage(null),this.optionsCache=null}clear(){this.draw()}dispose(){this.clear(),this.stopListening()}}iM([jA.dispose()],sM.prototype,"dispose",null);var rM,oM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},aM=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{const n=e.trim();if(n){const e=n.split(":");e.length&&(t[e[0].trim()]=e[1]?e[1].trim():"")}})),Object.keys(t).forEach((e=>{"width"!==e&&"height"!==e&&(s.style[e]="",this.container.style[e]=t[e])}))}this.content=document.createElement("div"),this.$content=this.$(this.content).addClass(this.prefixClassName(rM.contentClass)).css({width:this.graph.options.width,height:this.graph.options.height}),this.background=document.createElement("div"),this.$background=this.$(this.background).addClass(this.prefixClassName(rM.backgroundClass)),this.$content.append(this.background),this.options.pageVisible||this.$content.append(this.graph.view.grid),this.$content.append(s),this.$content.appendTo(this.container),this.startListening(),this.options.pageVisible||this.graph.grid.update(),this.backgroundManager=new lM.Background(this),this.options.autoResize||this.update()}get graph(){return this.options.graph}get model(){return this.graph.model}startListening(){const t=this.graph,e=this.model;t.on("scale",this.onScale,this),t.on("resize",this.onResize,this),t.on("before:print",this.storeScrollPosition,this),t.on("before:export",this.storeScrollPosition,this),t.on("after:print",this.restoreScrollPosition,this),t.on("after:export",this.restoreScrollPosition,this),t.on("render:done",this.onRenderDone,this),t.on("unfreeze",this.onUpdate,this),e.on("reseted",this.onUpdate,this),e.on("cell:added",this.onUpdate,this),e.on("cell:removed",this.onUpdate,this),e.on("cell:changed",this.onUpdate,this),e.on("batch:stop",this.onBatchStop,this),this.delegateBackgroundEvents()}stopListening(){const t=this.graph,e=this.model;t.off("scale",this.onScale,this),t.off("resize",this.onResize,this),t.off("beforeprint",this.storeScrollPosition,this),t.off("beforeexport",this.storeScrollPosition,this),t.off("afterprint",this.restoreScrollPosition,this),t.off("afterexport",this.restoreScrollPosition,this),t.off("render:done",this.onRenderDone,this),t.off("unfreeze",this.onUpdate,this),e.off("reseted",this.onUpdate,this),e.off("cell:added",this.onUpdate,this),e.off("cell:removed",this.onUpdate,this),e.off("cell:changed",this.onUpdate,this),e.off("batch:stop",this.onBatchStop,this),this.undelegateBackgroundEvents()}enableAutoResize(){this.options.autoResize=!0}disableAutoResize(){this.options.autoResize=!1}onUpdate(){!this.graph.isAsync()&&this.options.autoResize&&this.update()}onBatchStop(t){!this.graph.isAsync()&&this.options.autoResize&&nM.UPDATE_DELAYING_BATCHES.includes(t.name)&&this.update()}delegateBackgroundEvents(t){const e=t||BA.events;this.delegatedHandlers=Object.keys(e).reduce(((t,n)=>{const i=e[n];if(-1===n.indexOf(" "))if("function"===typeof i)t[n]=i;else{let e=this.graph.view[i];"function"===typeof e&&(e=e.bind(this.graph.view),t[n]=e)}return t}),{}),this.onBackgroundEvent=this.onBackgroundEvent.bind(this),Object.keys(this.delegatedHandlers).forEach((t=>{this.delegateEvent(t,{guarded:!1},this.onBackgroundEvent)}))}undelegateBackgroundEvents(){Object.keys(this.delegatedHandlers).forEach((t=>{this.undelegateEvent(t,this.onBackgroundEvent)}))}onBackgroundEvent(t){let e=!1;const n=t.target;if(this.options.pageVisible)e=this.options.background?this.background===n:this.content===n;else{const t=this.graph.view;e=t.background===n||t.grid===n}if(e){const e=this.delegatedHandlers[t.type];"function"===typeof e&&e.apply(this.graph,arguments)}}onRenderDone({stats:t}){this.options.autoResize&&t.priority<2&&this.update()}onResize(){this.cachedCenterPoint&&(this.centerPoint(this.cachedCenterPoint.x,this.cachedCenterPoint.y),this.updatePageBreak())}onScale({sx:t,sy:e,ox:n,oy:i}){this.updateScale(t,e),(n||i)&&(this.centerPoint(n,i),this.updatePageBreak());const s=this.options.autoResizeOptions||this.options.fitTocontentOptions;"function"===typeof s&&this.update()}storeScrollPosition(){this.cachedScrollLeft=this.container.scrollLeft,this.cachedScrollTop=this.container.scrollTop}restoreScrollPosition(){this.container.scrollLeft=this.cachedScrollLeft,this.container.scrollTop=this.cachedScrollTop,this.cachedScrollLeft=null,this.cachedScrollTop=null}storeClientSize(){this.cachedClientSize={width:this.container.clientWidth,height:this.container.clientHeight}}restoreClientSize(){this.cachedClientSize=null}beforeManipulation(){(w.IS_IE||w.IS_EDGE)&&this.$container.css("visibility","hidden")}afterManipulation(){(w.IS_IE||w.IS_EDGE)&&this.$container.css("visibility","visible")}updatePageSize(t,e){null!=t&&(this.options.pageWidth=t),null!=e&&(this.options.pageHeight=e),this.updatePageBreak()}updatePageBreak(){if(this.pageBreak&&this.pageBreak.parentNode&&this.pageBreak.parentNode.removeChild(this.pageBreak),this.pageBreak=null,this.options.pageVisible&&this.options.pageBreak){const t=this.graph.options.width,e=this.graph.options.height,n=this.options.pageWidth*this.sx,i=this.options.pageHeight*this.sy;if(t>n||e>i){let s=!1;const r=document.createElement("div");for(let e=1,i=Math.floor(t/n);e").addClass(this.prefixClassName("graph-pagebreak-vertical")).css({left:e*n}).appendTo(r),s=!0;for(let t=1,n=Math.floor(e/i);t").addClass(this.prefixClassName("graph-pagebreak-horizontal")).css({top:t*i}).appendTo(r),s=!0;s&&(jm(r,this.prefixClassName("graph-pagebreak")),this.$(this.graph.view.grid).after(r),this.pageBreak=r)}}}update(){const t=this.getClientSize();this.cachedCenterPoint=this.clientToLocalPoint(t.width/2,t.height/2);let e=this.options.autoResizeOptions||this.options.fitTocontentOptions;"function"===typeof e&&(e=Em(e,this,this));const n=Object.assign({gridWidth:this.options.pageWidth,gridHeight:this.options.pageHeight,allowNewOrigin:"negative"},e);this.graph.fitToContent(this.getFitToContentOptions(n))}getFitToContentOptions(t){const e=this.sx,n=this.sy;return t.gridWidth&&(t.gridWidth*=e),t.gridHeight&&(t.gridHeight*=n),t.minWidth&&(t.minWidth*=e),t.minHeight&&(t.minHeight*=n),"object"===typeof t.padding?t.padding={left:(t.padding.left||0)*e,right:(t.padding.right||0)*e,top:(t.padding.top||0)*n,bottom:(t.padding.bottom||0)*n}:"number"===typeof t.padding&&(t.padding*=e),this.options.autoResize||(t.contentArea=Ly.create()),t}updateScale(t,e){const n=this.graph.options,i=t/this.sx,s=e/this.sy;this.sx=t,this.sy=e,this.graph.translate(n.x*i,n.y*s),this.graph.resizeGraph(n.width*i,n.height*s)}scrollbarPosition(t,e,n){if(null==t&&null==e)return{left:this.container.scrollLeft,top:this.container.scrollTop};const i={};return"number"===typeof t&&(i.scrollLeft=t),"number"===typeof e&&(i.scrollTop=e),n&&n.animation?this.$container.animate(i,n.animation):this.$container.prop(i),this}scrollToPoint(t,e,n){const i=this.getClientSize(),s=this.graph.matrix(),r={};return"number"===typeof t&&(r.scrollLeft=t-i.width/2+s.e+(this.padding.left||0)),"number"===typeof e&&(r.scrollTop=e-i.height/2+s.f+(this.padding.top||0)),n&&n.animation?this.$container.animate(r,n.animation):this.$container.prop(r),this}scrollToContent(t){const e=this.sx,n=this.sy,i=this.graph.getContentArea().getCenter();return this.scrollToPoint(i.x*e,i.y*n,t)}scrollToCell(t,e){const n=this.sx,i=this.sy,s=t.getBBox().getCenter();return this.scrollToPoint(s.x*n,s.y*i,e)}center(t){return this.centerPoint(t)}centerPoint(t,e,n){const i=this.graph.matrix(),s=i.a,r=i.d,o=-i.e,a=-i.f,l=o+this.graph.options.width,c=a+this.graph.options.height;let h;if(this.storeClientSize(),"number"===typeof t||"number"===typeof e){h=n;const i=this.getVisibleArea().getCenter();"number"===typeof t?t*=s:t=i.x,"number"===typeof e?e*=r:e=i.y}else h=t,t=(o+l)/2,e=(a+c)/2;if(h&&h.padding)return this.positionPoint({x:t,y:e},"50%","50%",h);const u=this.getPadding(),d=this.getClientSize(),p=d.width/2,g=d.height/2,f=p-u.left-t+o,m=p-u.right+t-l,y=g-u.top-e+a,b=g-u.bottom+e-c;this.addPadding(Math.max(f,0),Math.max(m,0),Math.max(y,0),Math.max(b,0));const v=this.scrollToPoint(t,e,h||void 0);return this.restoreClientSize(),v}centerContent(t){return this.positionContent("center",t)}centerCell(t,e){return this.positionCell(t,"center",e)}positionContent(t,e){const n=this.graph.getContentArea(e);return this.positionRect(n,t,e)}positionCell(t,e,n){const i=t.getBBox();return this.positionRect(i,e,n)}positionRect(t,e,n){const i=Ly.create(t);switch(e){case"center":return this.positionPoint(i.getCenter(),"50%","50%",n);case"top":return this.positionPoint(i.getTopCenter(),"50%",0,n);case"top-right":return this.positionPoint(i.getTopRight(),"100%",0,n);case"right":return this.positionPoint(i.getRightMiddle(),"100%","50%",n);case"bottom-right":return this.positionPoint(i.getBottomRight(),"100%","100%",n);case"bottom":return this.positionPoint(i.getBottomCenter(),"50%","100%",n);case"bottom-left":return this.positionPoint(i.getBottomLeft(),0,"100%",n);case"left":return this.positionPoint(i.getLeftMiddle(),0,"50%",n);case"top-left":return this.positionPoint(i.getTopLeft(),0,0,n);default:return this}}positionPoint(t,e,n,i={}){const{padding:s}=i,r=aM(i,["padding"]),o=cm(s),a=Ly.fromSize(this.getClientSize()),l=a.clone().moveAndExpand({x:o.left,y:o.top,width:-o.right-o.left,height:-o.top-o.bottom});e=am(e,Math.max(0,l.width)),e<0&&(e=l.width+e),n=am(n,Math.max(0,l.height)),n<0&&(n=l.height+n);const c=l.getTopLeft().translate(e,n),h=a.getCenter().diff(c),u=this.zoom(),d=h.scale(1/u,1/u),p=jy.create(t).translate(d);return this.centerPoint(p.x,p.y,r)}zoom(t,e){if(null==t)return this.sx;let n,i;e=e||{};const s=this.getClientSize(),r=this.clientToLocalPoint(s.width/2,s.height/2);let o=t,a=t;if(e.absolute||(o+=this.sx,a+=this.sy),e.scaleGrid&&(o=Math.round(o/e.scaleGrid)*e.scaleGrid,a=Math.round(a/e.scaleGrid)*e.scaleGrid),e.maxScale&&(o=Math.min(e.maxScale,o),a=Math.min(e.maxScale,a)),e.minScale&&(o=Math.max(e.minScale,o),a=Math.max(e.minScale,a)),o=this.graph.transform.clampScale(o),a=this.graph.transform.clampScale(a),e.center){const t=o/this.sx,s=a/this.sy;n=e.center.x-(e.center.x-r.x)/t,i=e.center.y-(e.center.y-r.y)/s}else n=r.x,i=r.y;return this.beforeManipulation(),this.graph.transform.scale(o,a),this.centerPoint(n,i),this.afterManipulation(),this}zoomToRect(t,e={}){const n=Ly.create(t),i=this.graph;e.contentArea=n,null==e.viewportArea&&(e.viewportArea={x:i.options.x,y:i.options.y,width:this.$container.width(),height:this.$container.height()}),this.beforeManipulation(),i.transform.scaleContentToFitImpl(e,!1);const s=n.getCenter();return this.centerPoint(s.x,s.y),this.afterManipulation(),this}zoomToFit(t={}){return this.zoomToRect(this.graph.getContentArea(t),t)}transitionToPoint(t,e,n){let i,s;"object"===typeof t?(n=e,e=t.y,t=t.x):e=e,null==n&&(n={});const r=this.sx,o=Math.max(n.scale||r,1e-6),a=this.getClientSize(),l=new jy(t,e),c=this.clientToLocalPoint(a.width/2,a.height/2);if(r===o){const t=c.diff(l).scale(r,r).round();i=`translate(${t.x}px,${t.y}px)`}else{const t=o/(r-o)*l.distance(c),e=c.clone().move(l,t),n=this.localToBackgroundPoint(e).round();i=`scale(${o/r})`,s=`${n.x}px ${n.y}px`}const h=n.onTransitionEnd;return this.$container.addClass(rM.transitionClassName),this.$content.off(rM.transitionEventName).on(rM.transitionEventName,(n=>{this.syncTransition(o,{x:t,y:e}),"function"===typeof h&&Em(h,this,n.originalEvent)})).css({transform:i,transformOrigin:s,transition:"transform",transitionDuration:n.duration||"1s",transitionDelay:n.delay,transitionTimingFunction:n.timing}),this}syncTransition(t,e){return this.beforeManipulation(),this.graph.scale(t),this.removeTransition(),this.centerPoint(e.x,e.y),this.afterManipulation(),this}removeTransition(){return this.$container.removeClass(rM.transitionClassName),this.$content.off(rM.transitionEventName).css({transform:"",transformOrigin:"",transition:"",transitionDuration:"",transitionDelay:"",transitionTimingFunction:""}),this}transitionToRect(t,e={}){const n=Ly.create(t),i=e.maxScale||1/0,s=e.minScale||Number.MIN_VALUE,r=e.scaleGrid||null,o=e.visibility||1,a=e.center?jy.create(e.center):n.getCenter(),l=this.getClientSize(),c=l.width*o,h=l.height*o;let u=new Ly(a.x-c/2,a.y-h/2,c,h).getMaxUniformScaleToFit(n,a);return u=Math.min(u,i),r&&(u=Math.floor(u/r)*r),u=Math.max(s,u),this.transitionToPoint(a,Object.assign({scale:u},e))}startPanning(t){const e=this.normalizeEvent(t);this.clientX=e.clientX,this.clientY=e.clientY,this.trigger("pan:start",{e:e}),this.$(document.body).on({"mousemove.panning touchmove.panning":this.pan.bind(this),"mouseup.panning touchend.panning":this.stopPanning.bind(this),"mouseleave.panning":this.stopPanning.bind(this)}),this.$(window).on("mouseup.panning",this.stopPanning.bind(this))}pan(t){const e=this.normalizeEvent(t),n=e.clientX-this.clientX,i=e.clientY-this.clientY;this.container.scrollTop-=i,this.container.scrollLeft-=n,this.clientX=e.clientX,this.clientY=e.clientY,this.trigger("panning",{e:e})}stopPanning(t){this.$(document.body).off(".panning"),this.$(window).off(".panning"),this.trigger("pan:stop",{e:t})}clientToLocalPoint(t,e){let n="object"===typeof t?t.x:t,i="object"===typeof t?t.y:e;const s=this.graph.matrix();return n+=this.container.scrollLeft-this.padding.left-s.e,i+=this.container.scrollTop-this.padding.top-s.f,new jy(n/s.a,i/s.d)}localToBackgroundPoint(t,e){const n="object"===typeof t?jy.create(t):new jy(t,e),i=this.graph.matrix(),s=this.padding;return Hb(n,i).translate(s.left,s.top)}resize(t,e){let n=null!=t?t:this.container.offsetWidth,i=null!=e?e:this.container.offsetHeight;"number"===typeof n&&(n=Math.round(n)),"number"===typeof i&&(i=Math.round(i)),this.options.width=n,this.options.height=i,this.$container.css({width:n,height:i}),this.update()}getClientSize(){return this.cachedClientSize?this.cachedClientSize:{width:this.container.clientWidth,height:this.container.clientHeight}}autoScroll(t,e){const n=10,i=this.container,s=i.getBoundingClientRect();let r=0,o=0;return t<=s.left+n&&(r=-n),e<=s.top+n&&(o=-n),t>=s.right-n&&(r=n),e>=s.bottom-n&&(o=n),0!==r&&(i.scrollLeft+=r),0!==o&&(i.scrollTop+=o),{scrollerX:r,scrollerY:o}}addPadding(t,e,n,i){let s=this.getPadding();this.padding={left:Math.round(s.left+(t||0)),top:Math.round(s.top+(n||0)),bottom:Math.round(s.bottom+(i||0)),right:Math.round(s.right+(e||0))},s=this.padding,this.$content.css({width:s.left+this.graph.options.width+s.right,height:s.top+this.graph.options.height+s.bottom});const r=this.graph.container;return r.style.left=`${this.padding.left}px`,r.style.top=`${this.padding.top}px`,this}getPadding(){const t=this.options.padding;return cm("function"===typeof t?Em(t,this,this):t)}getVisibleArea(){const t=this.graph.matrix(),e=this.getClientSize(),n={x:this.container.scrollLeft||0,y:this.container.scrollTop||0,width:e.width,height:e.height},i=qb(n,t.inverse());return i.x-=(this.padding.left||0)/this.sx,i.y-=(this.padding.top||0)/this.sy,i}isCellVisible(t,e={}){const n=t.getBBox(),i=this.getVisibleArea();return e.strict?i.containsRect(n):i.isIntersectWithRect(n)}isPointVisible(t){return this.getVisibleArea().containsPoint(t)}lock(){return this.$container.css("overflow","hidden"),this}unlock(){return this.$container.css("overflow","scroll"),this}onRemove(){this.stopListening()}dispose(){this.$(this.graph.container).insertBefore(this.$container),this.remove()}}function cM(t,e,n,i={}){if(n){const s=n.graph,r=s.view.normalizeEvent(e),o=s.snapToGrid(r.clientX,r.clientY);n.notify(t,Object.assign({e:r,view:n,node:n.cell,cell:n.cell,x:o.x,y:o.y},i))}}oM([Ex.dispose()],lM.prototype,"dispose",null),function(t){class e extends sM{constructor(t){super(t.graph),this.scroller=t,t.options.background&&this.draw(t.options.background)}get elem(){return this.scroller.background}init(){this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this)}updateBackgroundOptions(t){this.scroller.options.background=t}}t.Background=e}(lM||(lM={})),function(t){function e(e){const n=kc({},t.defaultOptions,e);return null==n.pageWidth&&(n.pageWidth=e.graph.options.width),null==n.pageHeight&&(n.pageHeight=e.graph.options.height),n}t.containerClass="graph-scroller",t.panningClass=`${t.containerClass}-panning`,t.pannableClass=`${t.containerClass}-pannable`,t.pagedClass=`${t.containerClass}-paged`,t.contentClass=`${t.containerClass}-content`,t.backgroundClass=`${t.containerClass}-background`,t.transitionClassName="transition-in-progress",t.transitionEventName="transitionend.graph-scroller-transition",t.defaultOptions={padding(){const t=this.getClientSize(),e=Math.max(this.options.minVisibleWidth||0,1)||1,n=Math.max(this.options.minVisibleHeight||0,1)||1,i=Math.max(t.width-e,0),s=Math.max(t.height-n,0);return{left:i,top:s,right:i,bottom:s}},minVisibleWidth:50,minVisibleHeight:50,pageVisible:!1,pageBreak:!1,autoResize:!0},t.getOptions=e}(rM||(rM={}));var hM,uM,dM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class pM extends Ex{constructor(t){super(),this.options=kc({},hM.defaultOptions,t),this.options.model&&(this.options.collection=this.options.model.collection),this.options.collection?this.collection=this.options.collection:(this.collection=new yA([],{comparator:hM.depthComparator}),this.options.collection=this.collection),this.boxCount=0,this.createContainer(),this.initHandles(),this.startListening()}get graph(){return this.options.graph}get boxClassName(){return this.prefixClassName(hM.classNames.box)}get $boxes(){return this.$container.children(`.${this.boxClassName}`)}get handleOptions(){return this.options}startListening(){const t=this.graph,e=this.collection;this.delegateEvents({[`mousedown .${this.boxClassName}`]:"onSelectionBoxMouseDown",[`touchstart .${this.boxClassName}`]:"onSelectionBoxMouseDown"},!0),t.on("scale",this.onGraphTransformed,this),t.on("translate",this.onGraphTransformed,this),t.model.on("updated",this.onModelUpdated,this),e.on("added",this.onCellAdded,this),e.on("removed",this.onCellRemoved,this),e.on("reseted",this.onReseted,this),e.on("updated",this.onCollectionUpdated,this),e.on("node:change:position",this.onNodePositionChanged,this),e.on("cell:changed",this.onCellChanged,this)}stopListening(){const t=this.graph,e=this.collection;this.undelegateEvents(),t.off("scale",this.onGraphTransformed,this),t.off("translate",this.onGraphTransformed,this),t.model.off("updated",this.onModelUpdated,this),e.off("added",this.onCellAdded,this),e.off("removed",this.onCellRemoved,this),e.off("reseted",this.onReseted,this),e.off("updated",this.onCollectionUpdated,this),e.off("node:change:position",this.onNodePositionChanged,this),e.off("cell:changed",this.onCellChanged,this)}onRemove(){this.stopListening()}onGraphTransformed(){this.updateSelectionBoxes({async:!1})}onCellChanged(){this.updateSelectionBoxes()}onNodePositionChanged({node:t,options:e}){const{showNodeSelectionBox:n,pointerEvents:i}=this.options,{ui:s,selection:r}=e;let o=!this.translating;if(o=o&&(!0!==n||"none"===i),o=o&&s&&!r,o){this.translating=!0;const n=t.position(),i=t.previous("position"),s=n.x-i.x,r=n.y-i.y;0===s&&0===r||this.translateSelectedNodes(s,r,t,e),this.translating=!1}}onModelUpdated({removed:t}){t&&t.length&&this.unselect(t)}isEmpty(){return this.length<=0}isSelected(t){return this.collection.has(t)}get length(){return this.collection.length}get cells(){return this.collection.toArray()}select(t,e={}){e.dryrun=!0;const n=this.filter(Array.isArray(t)?t:[t]);return this.collection.add(n,e),this}unselect(t,e={}){return e.dryrun=!0,this.collection.remove(Array.isArray(t)?t:[t],e),this}reset(t,e={}){if(t){if(e.batch){const n=this.filter(Array.isArray(t)?t:[t]);return this.collection.reset(n,Object.assign(Object.assign({},e),{ui:!0})),this}const n=this.cells,i=this.filter(Array.isArray(t)?t:[t]),s={},r={};n.forEach((t=>s[t.id]=t)),i.forEach((t=>r[t.id]=t));const o=[],a=[];return i.forEach((t=>{s[t.id]||o.push(t)})),n.forEach((t=>{r[t.id]||a.push(t)})),a.length&&this.unselect(a,Object.assign(Object.assign({},e),{ui:!0})),o.length&&this.select(o,Object.assign(Object.assign({},e),{ui:!0})),0===a.length&&0===o.length&&this.updateContainer(),this}return this.clean(e)}clean(t={}){return this.length&&(!1===t.batch?this.unselect(this.cells,t):this.collection.reset([],Object.assign(Object.assign({},t),{ui:!0}))),this}setFilter(t){this.options.filter=t}setContent(t){this.options.content=t}startSelecting(t){let e,n;t=this.normalizeEvent(t),this.clean();const i=this.graph.container;if(null!=t.offsetX&&null!=t.offsetY&&i.contains(t.target))e=t.offsetX,n=t.offsetY;else{const s=this.$(i).offset(),r=i.scrollLeft,o=i.scrollTop;e=t.clientX-s.left+window.pageXOffset+r,n=t.clientY-s.top+window.pageYOffset+o}this.$container.css({top:n,left:e,width:1,height:1}),this.setEventData(t,{action:"selecting",clientX:t.clientX,clientY:t.clientY,offsetX:e,offsetY:n,scrollerX:0,scrollerY:0}),this.delegateDocumentEvents(hM.documentEvents,t.data)}filter(t){const e=this.options.filter;return Array.isArray(e)?t.filter((t=>!e.includes(t)&&!e.includes(t.shape))):"function"===typeof e?t.filter((t=>Em(e,this.graph,t))):t}stopSelecting(t){const e=this.graph,n=this.getEventData(t),i=n.action;switch(i){case"selecting":{let t=this.$container.width(),n=this.$container.height();const i=this.$container.offset(),s=e.pageToLocal(i.left,i.top),r=e.transform.getScale();t/=r.sx,n/=r.sy;const o=new Ly(s.x,s.y,t,n),a=this.getCellViewsInArea(o).map((t=>t.cell));this.reset(a,{batch:!0}),this.hideRubberband();break}case"translating":{const i=e.snapToGrid(t.clientX,t.clientY);if(!this.options.following){const t=n;this.updateSelectedNodesPosition({dx:t.clientX-t.originX,dy:t.clientY-t.originY})}this.graph.model.stopBatch("move-selection"),this.notifyBoxEvent("box:mouseup",t,i.x,i.y);break}default:this.clean();break}}onMouseUp(t){const e=this.getEventData(t).action;e&&(this.stopSelecting(t),this.undelegateDocumentEvents())}onSelectionBoxMouseDown(t){this.options.following||t.stopPropagation();const e=this.normalizeEvent(t);this.options.movable&&this.startTranslating(e);const n=this.getCellViewFromElem(e.target);this.setEventData(e,{activeView:n});const i=this.graph.snapToGrid(e.clientX,e.clientY);this.notifyBoxEvent("box:mousedown",e,i.x,i.y),this.delegateDocumentEvents(hM.documentEvents,e.data)}startTranslating(t){this.graph.model.startBatch("move-selection");const e=this.graph.snapToGrid(t.clientX,t.clientY);this.setEventData(t,{action:"translating",clientX:e.x,clientY:e.y,originX:e.x,originY:e.y})}getSelectionOffset(t,e){let n=t.x-e.clientX,i=t.y-e.clientY;const s=this.graph.hook.getRestrictArea();if(s){const r=this.collection.toArray(),o=ZS.getCellsBBox(r,{deep:!0})||Ly.create(),a=s.x-o.x,l=s.y-o.y,c=s.x+s.width-(o.x+o.width),h=s.y+s.height-(o.y+o.height);if(n=c?0:n,i=r<=l||r>=h?0:i}}return{dx:n,dy:i}}updateSelectedNodesPosition(t){const{dx:e,dy:n}=t;if(e||n)if(this.translateSelectedNodes(e,n),this.boxesUpdated)this.collection.length>1&&this.updateSelectionBoxes();else{const t=this.graph.transform.getScale();this.$boxes.add(this.$selectionContainer).css({left:"+="+e*t.sx,top:"+="+n*t.sy})}}autoScrollGraph(t,e){const n=this.graph.scroller.widget;return n?n.autoScroll(t,e):{scrollerX:0,scrollerY:0}}adjustSelection(t){const e=this.normalizeEvent(t),n=this.getEventData(e),i=n.action;switch(i){case"selecting":{const t=n;!0!==t.moving&&(this.$container.appendTo(this.graph.container),this.showRubberband(),t.moving=!0);const{scrollerX:i,scrollerY:s}=this.autoScrollGraph(e.clientX,e.clientY);t.scrollerX+=i,t.scrollerY+=s;const r=e.clientX-t.clientX+t.scrollerX,o=e.clientY-t.clientY+t.scrollerY,a=parseInt(this.$container.css("left"),10),l=parseInt(this.$container.css("top"),10);this.$container.css({left:r<0?t.offsetX+r:a,top:o<0?t.offsetY+o:l,width:Math.abs(r),height:Math.abs(o)});break}case"translating":{const i=this.graph.snapToGrid(e.clientX,e.clientY),s=n,r=this.getSelectionOffset(i,s);this.options.following?this.updateSelectedNodesPosition(r):this.updateContainerPosition(r),r.dx&&(s.clientX=i.x),r.dy&&(s.clientY=i.y),this.notifyBoxEvent("box:mousemove",t,i.x,i.y);break}default:break}this.boxesUpdated=!1}translateSelectedNodes(t,e,n,i){const s={},r=[];if(n&&(s[n.id]=!0),this.collection.toArray().forEach((t=>{t.getDescendants({deep:!0}).forEach((t=>{s[t.id]=!0}))})),i&&i.translateBy){const t=this.graph.getCellById(i.translateBy);t&&(s[t.id]=!0,t.getDescendants({deep:!0}).forEach((t=>{s[t.id]=!0})),r.push(t))}this.collection.toArray().forEach((n=>{if(!s[n.id]){const o=Object.assign(Object.assign({},i),{selection:this.cid,exclude:r});n.translate(t,e,o),this.graph.model.getConnectedEdges(n).forEach((n=>{s[n.id]||(n.translate(t,e,o),s[n.id]=!0)}))}}))}getCellViewsInArea(t){const e=this.graph,n={strict:this.options.strict};let i=[];return this.options.rubberNode&&(i=this.options.useCellGeometry?i.concat(e.model.getNodesInArea(t,n).map((t=>e.renderer.findViewByCell(t))).filter((t=>null!=t))):i.concat(e.renderer.findViewsInArea(t,n))),this.options.rubberEdge&&(i=this.options.useCellGeometry?i.concat(e.model.getEdgesInArea(t,n).map((t=>e.renderer.findViewByCell(t))).filter((t=>null!=t))):i.concat(e.renderer.findEdgeViewsInArea(t,n))),i}notifyBoxEvent(t,e,n,i){const s=this.getEventData(e),r=s.activeView;this.trigger(t,{e:e,view:r,x:n,y:i,cell:r.cell})}getSelectedClassName(t){return this.prefixClassName((t.isNode()?"node":"edge")+"-selected")}addCellSelectedClassName(t){const e=this.graph.renderer.findViewByCell(t);e&&e.addClass(this.getSelectedClassName(t))}removeCellUnSelectedClassName(t){const e=this.graph.renderer.findViewByCell(t);e&&e.removeClass(this.getSelectedClassName(t))}destroySelectionBox(t){this.removeCellUnSelectedClassName(t),this.canShowSelectionBox(t)&&(this.$container.find(`[data-cell-id="${t.id}"]`).remove(),0===this.$boxes.length&&this.hide(),this.boxCount=Math.max(0,this.boxCount-1))}destroyAllSelectionBoxes(t){t.forEach((t=>this.removeCellUnSelectedClassName(t))),this.hide(),this.$boxes.remove(),this.boxCount=0}hide(){this.$container.removeClass(this.prefixClassName(hM.classNames.rubberband)).removeClass(this.prefixClassName(hM.classNames.selected))}showRubberband(){this.$container.addClass(this.prefixClassName(hM.classNames.rubberband))}hideRubberband(){this.$container.removeClass(this.prefixClassName(hM.classNames.rubberband))}showSelected(){this.$container.removeAttr("style").addClass(this.prefixClassName(hM.classNames.selected))}createContainer(){this.container=document.createElement("div"),this.$container=this.$(this.container),this.$container.addClass(this.prefixClassName(hM.classNames.root)),this.options.className&&this.$container.addClass(this.options.className),this.$selectionContainer=this.$("
").addClass(this.prefixClassName(hM.classNames.inner)),this.$selectionContent=this.$("
").addClass(this.prefixClassName(hM.classNames.content)),this.$selectionContainer.append(this.$selectionContent),this.$selectionContainer.attr("data-selection-length",this.collection.length),this.$container.prepend(this.$selectionContainer),this.$handleContainer=this.$selectionContainer}updateContainerPosition(t){(t.dx||t.dy)&&this.$selectionContainer.css({left:`+=${t.dx}`,top:`+=${t.dy}`})}updateContainer(){const t={x:1/0,y:1/0},e={x:0,y:0},n=this.collection.toArray().filter((t=>this.canShowSelectionBox(t)));n.forEach((n=>{const i=this.graph.renderer.findViewByCell(n);if(i){const n=i.getBBox({useCellGeometry:this.options.useCellGeometry});t.x=Math.min(t.x,n.x),t.y=Math.min(t.y,n.y),e.x=Math.max(e.x,n.x+n.width),e.y=Math.max(e.y,n.y+n.height)}})),this.$selectionContainer.css({position:"absolute",pointerEvents:"none",left:t.x,top:t.y,width:e.x-t.x,height:e.y-t.y}).attr("data-selection-length",this.collection.length);const i=this.options.content;if(i)if("function"===typeof i){const t=Em(i,this.graph,this,this.$selectionContent[0]);t&&this.$selectionContent.html(t)}else this.$selectionContent.html(i);this.collection.length>0&&!this.container.parentNode?this.$container.appendTo(this.graph.container):this.collection.length<=0&&this.container.parentNode&&this.container.parentNode.removeChild(this.container)}canShowSelectionBox(t){return t.isNode()&&!0===this.options.showNodeSelectionBox||t.isEdge()&&!0===this.options.showEdgeSelectionBox}createSelectionBox(t){if(this.addCellSelectedClassName(t),this.canShowSelectionBox(t)){const e=this.graph.renderer.findViewByCell(t);if(e){const n=e.getBBox({useCellGeometry:this.options.useCellGeometry}),i=this.boxClassName;this.$("
").addClass(i).addClass(`${i}-${t.isNode()?"node":"edge"}`).attr("data-cell-id",t.id).css({position:"absolute",left:n.x,top:n.y,width:n.width,height:n.height,pointerEvents:this.options.pointerEvents||"auto"}).appendTo(this.container),this.showSelected(),this.boxCount+=1}}}updateSelectionBoxes(t={}){this.collection.length>0&&(this.boxesUpdated=!0,this.graph.renderer.requestViewUpdate(this,1,2,t))}confirmUpdate(){return this.boxCount&&(this.hide(),this.$boxes.each(((t,e)=>{const n=this.$(e).remove().attr("data-cell-id"),i=this.collection.get(n);i&&this.createSelectionBox(i)})),this.updateContainer()),0}getCellViewFromElem(t){const e=t.getAttribute("data-cell-id");if(e){const t=this.collection.get(e);if(t)return this.graph.renderer.findViewByCell(t)}return null}onCellRemoved({cell:t}){this.destroySelectionBox(t),this.updateContainer()}onReseted({previous:t,current:e}){this.destroyAllSelectionBoxes(t),e.forEach((t=>{this.listenCellRemoveEvent(t),this.createSelectionBox(t)})),this.updateContainer()}onCellAdded({cell:t}){this.listenCellRemoveEvent(t),this.createSelectionBox(t),this.updateContainer()}listenCellRemoveEvent(t){t.off("removed",this.onCellRemoved,this),t.on("removed",this.onCellRemoved,this)}onCollectionUpdated({added:t,removed:e,options:n}){t.forEach((t=>{this.trigger("cell:selected",{cell:t,options:n}),this.graph.trigger("cell:selected",{cell:t,options:n}),t.isNode()?(this.trigger("node:selected",{cell:t,options:n,node:t}),this.graph.trigger("node:selected",{cell:t,options:n,node:t})):t.isEdge()&&(this.trigger("edge:selected",{cell:t,options:n,edge:t}),this.graph.trigger("edge:selected",{cell:t,options:n,edge:t}))})),e.forEach((t=>{this.trigger("cell:unselected",{cell:t,options:n}),this.graph.trigger("cell:unselected",{cell:t,options:n}),t.isNode()?(this.trigger("node:unselected",{cell:t,options:n,node:t}),this.graph.trigger("node:unselected",{cell:t,options:n,node:t})):t.isEdge()&&(this.trigger("edge:unselected",{cell:t,options:n,edge:t}),this.graph.trigger("edge:unselected",{cell:t,options:n,edge:t}))}));const i={added:t,removed:e,options:n,selected:this.cells};this.trigger("selection:changed",i),this.graph.trigger("selection:changed",i)}deleteSelectedCells(){const t=this.collection.toArray();this.clean(),this.graph.model.removeCells(t,{selection:this.cid})}startRotate({e:t}){const e=this.collection.toArray(),n=ZS.getCellsBBox(e).getCenter(),i=this.graph.snapToGrid(t.clientX,t.clientY),s=e.reduce(((t,e)=>(t[e.id]=Ay.normalize(e.getAngle()),t)),{});this.setEventData(t,{center:n,angles:s,start:i.theta(n)})}doRotate({e:t}){const e=this.getEventData(t),n=this.graph.options.rotating.grid,i="function"===typeof n?Em(n,this.graph,null):n,s=this.graph.snapToGrid(t.clientX,t.clientY),r=e.start-s.theta(e.center);e.rotated||(e.rotated=!0),Math.abs(r)>.001&&(this.collection.toArray().forEach((t=>{const n=ww.snapToGrid(e.angles[t.id]+r,i||15);t.rotate(n,{absolute:!0,center:e.center,selection:this.cid})})),this.updateSelectionBoxes())}stopRotate({e:t}){const e=this.getEventData(t);e.rotated&&(e.rotated=!1,this.collection.toArray().forEach((e=>{cM("node:rotated",t,this.graph.findViewByCell(e))})))}startResize({e:t}){const e=this.graph.getGridSize(),n=this.collection.toArray(),i=ZS.getCellsBBox(n),s=n.map((t=>t.getBBox())),r=s.reduce(((t,e)=>e.widthe.height.001||Math.abs(o-l)>.001)&&(this.graph.model.resizeCells(a,l,i.cells,{selection:this.cid}),s.width=a,s.height=l,this.updateSelectionBoxes())}stopResize({e:t}){const e=this.eventData(t);e.resized&&(e.resized=!1,this.collection.toArray().forEach((e=>{cM("node:resized",t,this.graph.findViewByCell(e))})))}dispose(){this.clean(),this.remove()}}dM([Ex.dispose()],pM.prototype,"dispose",null),$u(pM,VA),function(t){const e="widget-selection";function n(t){return t.getAncestors().length}t.classNames={root:e,inner:`${e}-inner`,box:`${e}-box`,content:`${e}-content`,rubberband:`${e}-rubberband`,selected:`${e}-selected`},t.documentEvents={mousemove:"adjustSelection",touchmove:"adjustSelection",mouseup:"onMouseUp",touchend:"onMouseUp",touchcancel:"onMouseUp"},t.defaultOptions={movable:!0,following:!0,strict:!1,useCellGeometry:!1,content(t){return ug('<%= length %> node<%= length > 1 ? "s":"" %> selected.')({length:t.length})},handles:[{name:"remove",position:"nw",events:{mousedown:"deleteSelectedCells"}},{name:"rotate",position:"sw",events:{mousedown:"startRotate",mousemove:"doRotate",mouseup:"stopRotate"}},{name:"resize",position:"se",events:{mousedown:"startResize",mousemove:"doResize",mouseup:"stopResize"}}]},t.depthComparator=n}(hM||(hM={}));class gM extends qA{get node(){return this.cell}get containerClassName(){return this.prefixClassName("widget-transform")}get resizeClassName(){return`${this.containerClassName}-resize`}get rotateClassName(){return`${this.containerClassName}-rotate`}init(t){this.options=Object.assign(Object.assign({},uM.defaultOptions),t),this.render(),this.startListening()}startListening(){this.delegateEvents({[`mousedown .${this.resizeClassName}`]:"startResizing",[`touchstart .${this.resizeClassName}`]:"startResizing",[`mousedown .${this.rotateClassName}`]:"startRotating",[`touchstart .${this.rotateClassName}`]:"startRotating"}),this.model.on("*",this.update,this),this.graph.on("scale",this.update,this),this.graph.on("translate",this.update,this),this.node.on("removed",this.remove,this),this.model.on("reseted",this.remove,this),this.view.on("cell:knob:mousedown",this.onKnobMouseDown,this),this.view.on("cell:knob:mouseup",this.onKnobMouseUp,this),super.startListening()}stopListening(){this.undelegateEvents(),this.model.off("*",this.update,this),this.graph.off("scale",this.update,this),this.graph.off("translate",this.update,this),this.node.off("removed",this.remove,this),this.model.off("reseted",this.remove,this),this.view.off("cell:knob:mousedown",this.onKnobMouseDown,this),this.view.off("cell:knob:mouseup",this.onKnobMouseUp,this),super.stopListening()}renderHandles(){this.container=document.createElement("div"),this.$container=this.$(this.container);const t=this.$("
").prop("draggable",!1),e=t.clone().addClass(this.rotateClassName),n=uM.POSITIONS.map((e=>t.clone().addClass(this.resizeClassName).attr("data-position",e)));this.empty(),this.$container.append(n,e)}render(){return this.renderHandles(),this.view.addClass(uM.NODE_CLS),this.$container.addClass(this.containerClassName).toggleClass("no-orth-resize",this.options.preserveAspectRatio||!this.options.orthogonalResizing).toggleClass("no-resize",!this.options.resizable).toggleClass("no-rotate",!this.options.rotatable),this.options.className&&this.$container.addClass(this.options.className),this.graph.container.appendChild(this.container),this.update()}update(){const t=this.graph.matrix(),e=this.node.getBBox();e.x*=t.a,e.x+=t.e,e.y*=t.d,e.y+=t.f,e.width*=t.a,e.height*=t.d;const n=Ay.normalize(this.node.getAngle()),i=0!==n?`rotate(${n}deg)`:"";return this.$container.css({transform:i,width:e.width,height:e.height,left:e.x,top:e.y}),this.updateResizerDirections(),this}remove(){return this.view.removeClass(uM.NODE_CLS),super.remove()}onKnobMouseDown(){this.startHandle()}onKnobMouseUp(){this.stopHandle()}updateResizerDirections(){const t=Ay.normalize(this.node.getAngle()),e=Math.floor(t*(uM.DIRECTIONS.length/360));if(e!==this.prevShift){const t=uM.DIRECTIONS.slice(e).concat(uM.DIRECTIONS.slice(0,e)),n=t=>`${this.containerClassName}-cursor-${t}`;this.$container.find(`.${this.resizeClassName}`).removeClass(uM.DIRECTIONS.map((t=>n(t))).join(" ")).each(((e,i)=>{this.$(i).addClass(n(t[e]))})),this.prevShift=e}}getTrueDirection(t){const e=Ay.normalize(this.node.getAngle());let n=uM.POSITIONS.indexOf(t);return n+=Math.floor(e*(uM.POSITIONS.length/360)),n%=uM.POSITIONS.length,uM.POSITIONS[n]}toValidResizeDirection(t){return{top:"top-left",bottom:"bottom-right",left:"bottom-left",right:"top-right"}[t]||t}startResizing(t){t.stopPropagation(),this.model.startBatch("resize",{cid:this.cid});const e=this.$(t.target).attr("data-position"),n=this.graph.findViewByCell(this.node);this.prepareResizing(t,e),this.startAction(t),cM("node:resize:mousedown",t,n)}prepareResizing(t,e){const n=this.getTrueDirection(e);let i=0,s=0;e.split("-").forEach((t=>{i={left:-1,right:1}[t]||i,s={top:-1,bottom:1}[t]||s}));const r=this.toValidResizeDirection(e),o={"top-right":"bottomLeft","top-left":"bottomRight","bottom-left":"topRight","bottom-right":"topLeft"}[r],a=Ay.normalize(this.node.getAngle());this.setEventData(t,{selector:o,direction:r,trueDirection:n,relativeDirection:e,angle:a,resizeX:i,resizeY:s,action:"resizing"})}startRotating(t){t.stopPropagation(),this.model.startBatch("rotate",{cid:this.cid});const e=this.graph.findViewByCell(this.node),n=this.node.getBBox().getCenter(),i=this.normalizeEvent(t),s=this.graph.snapToGrid(i.clientX,i.clientY);this.setEventData(t,{center:n,action:"rotating",angle:Ay.normalize(this.node.getAngle()),start:jy.create(s).theta(n)}),this.startAction(t),cM("node:rotate:mousedown",t,e)}onMouseMove(t){const e=this.graph.findViewByCell(this.node);let n=this.getEventData(t);if(n.action){const i=this.normalizeEvent(t);let s=i.clientX,r=i.clientY;const o=this.graph.scroller.widget,a=this.options.restrictedResizing;if(!0===a||"number"===typeof a){const t=!0===a?0:a,e=o?Math.max(t,8):t,n=this.graph.container.getBoundingClientRect();s=sm(s,n.left+e,n.right-e),r=sm(r,n.top+e,n.bottom-e)}else this.options.autoScrollOnResizing&&o&&o.autoScroll(s,r);const l=this.graph.snapToGrid(s,r),c=this.graph.getGridSize(),h=this.node,u=this.options;if("resizing"===n.action){n=n,n.resized||(e&&(e.addClass("node-resizing"),cM("node:resize",t,e)),n.resized=!0);const i=h.getBBox(),s=jy.create(l).rotate(n.angle,i.getCenter()).diff(i[n.selector]);let r=n.resizeX?s.x*n.resizeX:i.width,o=n.resizeY?s.y*n.resizeY:i.height;const a=r,d=o;if(r=ww.snapToGrid(r,c),o=ww.snapToGrid(o,c),r=Math.max(r,u.minWidth||c),o=Math.max(o,u.minHeight||c),r=Math.min(r,u.maxWidth||1/0),o=Math.min(o,u.maxHeight||1/0),u.preserveAspectRatio){const t=i.width*o/i.height,e=i.height*r/i.width;r{const r=n[s];i[s]="function"===typeof r?r.call(t,e):r})),i}t.parseOptionGroup=e})(fM||(fM={})),function(t){function e(e){const{grid:n,panning:i,selecting:s,embedding:r,snapline:o,resizing:a,rotating:l,knob:c,clipboard:h,history:u,scroller:d,minimap:p,keyboard:g,mousewheel:f}=e,m=mM(e,["grid","panning","selecting","embedding","snapline","resizing","rotating","knob","clipboard","history","scroller","minimap","keyboard","mousewheel"]),y=e.container;if(null==y)throw new Error("Ensure the container of the graph is specified and valid");null==m.width&&(m.width=y.clientWidth),null==m.height&&(m.height=y.clientHeight);const b=kc({},t.defaults,m),v={size:10,visible:!1};b.grid="number"===typeof n?{size:n,visible:!1}:"boolean"===typeof n?Object.assign(Object.assign({},v),{visible:n}):Object.assign(Object.assign({},v),n);const C=["panning","selecting","embedding","snapline","resizing","rotating","knob","clipboard","history","scroller","minimap","keyboard","mousewheel"];return C.forEach((t=>{const n=e[t];"boolean"===typeof n?b[t].enabled=n:b[t]=Object.assign(Object.assign({},b[t]),n)})),b.background&&b.scroller.enabled&&null==b.scroller.background&&(b.scroller.background=b.background,delete b.background),b}t.get=e}(fM||(fM={})),function(t){t.defaults={x:0,y:0,grid:{size:10,visible:!1},scaling:{min:.01,max:16},background:!1,highlighting:{default:{name:"stroke",args:{padding:3}},nodeAvailable:{name:"className",args:{className:ww.prefix("available-node")}},magnetAvailable:{name:"className",args:{className:ww.prefix("available-magnet")}}},connecting:{snap:!1,multi:!0,dangling:!0,allowLoop:!0,allowNode:!0,allowEdge:!1,allowPort:!0,highlight:!1,anchor:"center",edgeAnchor:"ratio",connectionPoint:"boundary",strategy:null,router:"normal",connector:"normal",validateConnection({type:t,sourceView:e,targetView:n}){const i="target"===t?n:e;return null!=i},createEdge(){return new PA}},transforming:{clearAll:!0,clearOnBlankMouseDown:!0},resizing:{enabled:!1,minWidth:0,minHeight:0,maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,orthogonal:!0,restricted:!1,autoScroll:!0,preserveAspectRatio:!1,allowReverse:!0},rotating:{enabled:!1,grid:15},translating:{restrict:!1},knob:{enabled:!1,clearAll:!0,clearOnBlankMouseDown:!0},embedding:{enabled:!1,findParent:"bbox",frontOnly:!0,validate:()=>!0},selecting:{enabled:!1,rubberband:!1,rubberNode:!0,rubberEdge:!1,pointerEvents:"auto",multiple:!0,movable:!0,strict:!1,useCellGeometry:!1,selectCellOnMoved:!1,selectNodeOnMoved:!1,selectEdgeOnMoved:!1,content:null,handles:null},panning:{enabled:!1,eventTypes:["leftMouseDown"]},snapline:{enabled:!1},clipboard:{enabled:!1},history:{enabled:!1},scroller:{enabled:!1},keyboard:{enabled:!1},mousewheel:{enabled:!1,factor:1.2,zoomAtMousePosition:!0},async:!1,frozen:!1,sorting:"exact",moveThreshold:0,clickThreshold:0,magnetThreshold:0,preventDefaultDblClick:!0,preventDefaultMouseDown:!1,preventDefaultContextMenu:!0,preventDefaultBlankAction:!0,interacting:{edgeLabelMovable:!1},guard:()=>!1}}(fM||(fM={}));var yM=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{const e=null!=t.opacity&&Number.isFinite(t.opacity)?t.opacity:1;return``})),r=`<${n}>${s.join("")}`,o=Object.assign({id:e},t.attrs);rb.create(r,o).appendTo(this.defs)}return e}marker(t){const{id:e,refX:n,refY:i,markerUnits:s,markerOrient:r,tagName:o,children:a}=t,l=yM(t,["id","refX","refY","markerUnits","markerOrient","tagName","children"]);let c=e;if(c||(c=`marker-${this.cid}-${Yf(JSON.stringify(t))}`),!this.isDefined(c)){"path"!==o&&delete l.d;const t=rb.create("marker",{refX:n,refY:i,id:c,overflow:"visible",orient:null!=r?r:"auto",markerUnits:s||"userSpaceOnUse"},a?a.map((t=>{var{tagName:e}=t,n=yM(t,["tagName"]);return rb.create(`${e}`||"path",dy(Object.assign(Object.assign({},l),n)))})):[rb.create(o||"path",dy(l))]);this.defs.appendChild(t.node)}return c}remove(t){const e=this.svg.getElementById(t);e&&e.parentNode&&e.parentNode.removeChild(e)}}var vM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},CM=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{const o=`pattern_${r}`,a=n.a||1,l=n.d||1,{update:c,markup:h}=t,u=CM(t,["update","markup"]),d=Object.assign(Object.assign(Object.assign({},u),s[r]),{sx:a,sy:l,ox:n.e||0,oy:n.f||0,width:e*a,height:e*l});i.has(o)||i.add(o,rb.create("pattern",{id:o,patternUnits:"userSpaceOnUse"},rb.createVectors(h)).node);const p=i.get(o);"function"===typeof c&&c(p.childNodes[0],d);let g=d.ox%d.width;g<0&&(g+=d.width);let f=d.oy%d.height;f<0&&(f+=d.height),hy(p,{x:g,y:f,width:d.width,height:d.height})}));const r=(new XMLSerializer).serializeToString(i.root),o=`url(data:image/svg+xml;base64,${btoa(r)})`;this.elem.style.backgroundImage=o}getInstance(){return this.instance||(this.instance=new tw),this.instance}resolveGrid(t){if(!t)return[];const e=t.type;if(null==e)return[Object.assign(Object.assign({},tw.presets.dot),t.args)];const n=tw.registry.get(e);if(n){let e=t.args||[];return Array.isArray(e)||(e=[e]),Array.isArray(n)?n.map(((t,n)=>Object.assign(Object.assign({},t),e[n]))):[Object.assign(Object.assign({},n),e[0])]}return tw.registry.onNotFound(e)}dispose(){this.stopListening(),this.clear()}}vM([jA.dispose()],wM.prototype,"dispose",null);class xM extends jA{getClientMatrix(){return Lb(this.view.stage.getScreenCTM())}getClientOffset(){const t=this.view.svg.getBoundingClientRect();return new jy(t.left,t.top)}getPageOffset(){return this.getClientOffset().translate(window.scrollX,window.scrollY)}snapToGrid(t,e){const n="number"===typeof t?this.clientToLocalPoint(t,e):this.clientToLocalPoint(t.x,t.y);return n.snapToGrid(this.graph.getGridSize())}localToGraphPoint(t,e){const n=jy.create(t,e);return Hb(n,this.graph.matrix())}localToClientPoint(t,e){const n=jy.create(t,e);return Hb(n,this.getClientMatrix())}localToPagePoint(t,e){const n="number"===typeof t?this.localToGraphPoint(t,e):this.localToGraphPoint(t);return n.translate(this.getPageOffset())}localToGraphRect(t,e,n,i){const s=Ly.create(t,e,n,i);return qb(s,this.graph.matrix())}localToClientRect(t,e,n,i){const s=Ly.create(t,e,n,i);return qb(s,this.getClientMatrix())}localToPageRect(t,e,n,i){const s="number"===typeof t?this.localToGraphRect(t,e,n,i):this.localToGraphRect(t);return s.translate(this.getPageOffset())}graphToLocalPoint(t,e){const n=jy.create(t,e);return Hb(n,this.graph.matrix().inverse())}clientToLocalPoint(t,e){const n=jy.create(t,e);return Hb(n,this.getClientMatrix().inverse())}clientToGraphPoint(t,e){const n=jy.create(t,e);return Hb(n,this.graph.matrix().multiply(this.getClientMatrix().inverse()))}pageToLocalPoint(t,e){const n=jy.create(t,e),i=n.diff(this.getPageOffset());return this.graphToLocalPoint(i)}graphToLocalRect(t,e,n,i){const s=Ly.create(t,e,n,i);return qb(s,this.graph.matrix().inverse())}clientToLocalRect(t,e,n,i){const s=Ly.create(t,e,n,i);return qb(s,this.getClientMatrix().inverse())}clientToGraphRect(t,e,n,i){const s=Ly.create(t,e,n,i);return qb(s,this.graph.matrix().multiply(this.getClientMatrix().inverse()))}pageToLocalRect(t,e,n,i){const s=Ly.create(t,e,n,i),r=this.getPageOffset();return s.x-=r.x,s.y-=r.y,this.graphToLocalRect(s)}}var EM,SM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class AM extends jA{constructor(){super(...arguments),this.widget=this.graph.hook.createSnapline()}dispose(){this.widget.dispose()}}SM([jA.dispose()],AM.prototype,"dispose",null),function(t){function e(t){const e=[],n=[];return Array.isArray(t)?e.push(...t):t.split("|").forEach((t=>{-1===t.indexOf("&")?e.push(t):n.push(...t.split("&"))})),{or:e,and:n}}function n(t,n){if(null!=t&&null!=n){const i=e(t),s=e(n),r=i.or.sort(),o=s.or.sort(),a=i.and.sort(),l=s.and.sort(),c=(t,e)=>t.length===e.length&&(0===t.length||t.every(((t,n)=>t===e[n])));return c(r,o)&&c(a,l)}return null==t&&null==n}function i(t,n,i){if(null==n||Array.isArray(n)&&0===n.length)return!i||!0!==t.altKey&&!0!==t.ctrlKey&&!0!==t.metaKey&&!0!==t.shiftKey;const{or:s,and:r}=e(n),o=e=>{const n=`${e.toLowerCase()}Key`;return!0===t[n]};return s.some((t=>o(t)))&&r.every((t=>o(t)))}t.parse=e,t.equals=n,t.isMatch=i}(EM||(EM={}));var MM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class kM extends jA{get widgetOptions(){return this.options.scroller}get pannable(){return!!this.widgetOptions&&("object"===typeof this.widgetOptions.pannable?this.widgetOptions.pannable.enabled:!!this.widgetOptions.pannable)}init(){this.widget=this.graph.hook.createScroller(),this.startListening(),this.updateClassName(),this.widget&&this.widget.center()}startListening(){let t=[];const e=this.widgetOptions.pannable;t="object"===typeof e?e.eventTypes||[]:["leftMouseDown"],t.includes("leftMouseDown")&&(this.graph.on("blank:mousedown",this.preparePanning,this),this.graph.on("node:unhandled:mousedown",this.preparePanning,this),this.graph.on("edge:unhandled:mousedown",this.preparePanning,this)),t.includes("rightMouseDown")&&(this.onRightMouseDown=this.onRightMouseDown.bind(this),this.view.$(this.widget.container).on("mousedown",this.onRightMouseDown))}stopListening(){let t=[];const e=this.widgetOptions.pannable;t="object"===typeof e?e.eventTypes||[]:["leftMouseDown"],t.includes("leftMouseDown")&&(this.graph.off("blank:mousedown",this.preparePanning,this),this.graph.off("node:unhandled:mousedown",this.preparePanning,this),this.graph.off("edge:unhandled:mousedown",this.preparePanning,this)),t.includes("rightMouseDown")&&this.view.$(this.widget.container).off("mousedown",this.onRightMouseDown)}onRightMouseDown(t){2===t.button&&this.allowPanning(t,!0)&&this.widget&&(this.updateClassName(!0),this.widget.startPanning(t),this.widget.once("pan:stop",(()=>this.updateClassName(!1))))}preparePanning({e:t}){this.widget&&(this.allowPanning(t,!0)||this.allowPanning(t)&&!this.graph.selection.allowRubberband(t,!0))&&(this.updateClassName(!0),this.widget.startPanning(t),this.widget.once("pan:stop",(()=>this.updateClassName(!1))))}allowPanning(t,e){return this.widget&&this.pannable&&EM.isMatch(t,this.widgetOptions.modifiers,e)&&this.graph.hook.allowPanning(t)}updateClassName(t){if(null==this.widget)return;const e=this.widget.container,n=this.view.prefixClassName("graph-scroller-pannable");this.pannable?(jm(e,n),e.dataset.panning=(!!t).toString()):Lm(e,n)}enablePanning(){this.pannable||(this.widgetOptions.pannable=!0,this.updateClassName())}disablePanning(){this.pannable&&(this.widgetOptions.pannable=!1,this.updateClassName())}lock(){this.widget&&this.widget.lock()}unlock(){this.widget&&this.widget.unlock()}update(){this.widget&&this.widget.update()}enableAutoResize(){this.widget&&this.widget.enableAutoResize()}disableAutoResize(){this.widget&&this.widget.disableAutoResize()}resize(t,e){this.widget&&this.widget.resize(t,e)}dispose(){this.widget&&this.widget.dispose(),this.stopListening()}}MM([jA.dispose()],kM.prototype,"dispose",null);var OM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},PM=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class NM extends jA{constructor(){super(...arguments),this.highlights={}}init(){this.startListening()}startListening(){this.graph.on("cell:highlight",this.onCellHighlight,this),this.graph.on("cell:unhighlight",this.onCellUnhighlight,this)}stopListening(){this.graph.off("cell:highlight",this.onCellHighlight,this),this.graph.off("cell:unhighlight",this.onCellUnhighlight,this)}onCellHighlight({view:t,magnet:e,options:n={}}){const i=this.resolveHighlighter(n);if(!i)return;const s=this.getHighlighterId(e,i);if(!this.highlights[s]){const n=i.highlighter;n.highlight(t,e,Object.assign({},i.args)),this.highlights[s]={cellView:t,magnet:e,highlighter:n,args:i.args}}}onCellUnhighlight({magnet:t,options:e={}}){const n=this.resolveHighlighter(e);if(!n)return;const i=this.getHighlighterId(t,n);this.unhighlight(i)}resolveHighlighter(t){const e=this.options;let n=t.highlighter;if(null==n){const i=t.type;n=i&&e.highlighting[i]||e.highlighting.default}if(null==n)return null;const i="string"===typeof n?{name:n}:n,s=i.name,r=Pw.registry.get(s);return null==r?Pw.registry.onNotFound(s):(Pw.check(s,r),{name:s,highlighter:r,args:i.args||{}})}getHighlighterId(t,e){return $m(t),e.name+t.id+JSON.stringify(e.args)}unhighlight(t){const e=this.highlights[t];e&&(e.highlighter.unhighlight(e.cellView,e.magnet,e.args),delete this.highlights[t])}dispose(){Object.keys(this.highlights).forEach((t=>this.unhighlight(t))),this.stopListening()}}DM([NM.dispose()],NM.prototype,"dispose",null);var jM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class LM extends jA{constructor(){super(...arguments),this.widgets=new Map}get container(){return this.graph.view.container}get viewport(){return this.graph.view.viewport}get isSelectionEnabled(){return!0===this.options.selecting.enabled}init(){this.startListening(),this.resize()}startListening(){this.graph.on("node:mouseup",this.onNodeMouseUp,this),this.graph.on("node:selected",this.onNodeSelected,this),this.graph.on("node:unselected",this.onNodeUnSelected,this)}stopListening(){this.graph.off("node:mouseup",this.onNodeMouseUp,this),this.graph.off("node:selected",this.onNodeSelected,this),this.graph.off("node:unselected",this.onNodeUnSelected,this)}onNodeMouseUp({node:t}){if(!this.isSelectionEnabled){const e=this.graph.hook.createTransform(t,{clearAll:!0});e&&this.widgets.set(t,e)}}onNodeSelected({node:t}){if(this.isSelectionEnabled){const e=this.graph.hook.createTransform(t,{clearAll:!1});e&&this.widgets.set(t,e)}}onNodeUnSelected({node:t}){if(this.isSelectionEnabled){const e=this.widgets.get(t);e&&e.dispose(),this.widgets.delete(t)}}getMatrix(){const t=this.viewport.getAttribute("transform");return t!==this.viewportTransformString&&(this.viewportMatrix=this.viewport.getCTM(),this.viewportTransformString=t),Lb(this.viewportMatrix)}setMatrix(t){const e=Lb(t),n=Rb(e);this.viewport.setAttribute("transform",n),this.viewportMatrix=e,this.viewportTransformString=n}resize(t,e){let n=void 0===t?this.options.width:t,i=void 0===e?this.options.height:e;this.options.width=n,this.options.height=i,"number"===typeof n&&(n=Math.round(n)),"number"===typeof i&&(i=Math.round(i)),this.container.style.width=null==n?"":`${n}px`,this.container.style.height=null==i?"":`${i}px`;const s=this.getComputedSize();return this.graph.trigger("resize",Object.assign({},s)),this}getComputedSize(){let t=this.options.width,e=this.options.height;return nm(t)||(t=this.container.clientWidth),nm(e)||(e=this.container.clientHeight),{width:t,height:e}}getScale(){return _b(this.getMatrix())}scale(t,e=t,n=0,i=0){if(t=this.clampScale(t),e=this.clampScale(e),n||i){const s=this.getTranslation(),r=s.tx-n*(t-1),o=s.ty-i*(e-1);r===s.tx&&o===s.ty||this.translate(r,o)}const s=this.getMatrix();return s.a=t,s.d=e,this.setMatrix(s),this.graph.trigger("scale",{sx:t,sy:e,ox:n,oy:i}),this}clampScale(t){const e=this.graph.options.scaling;return sm(t,e.min||.01,e.max||16)}getZoom(){return this.getScale().sx}zoom(t,e){e=e||{};let n=t,i=t;const s=this.getScale(),r=this.getComputedSize();let o=r.width/2,a=r.height/2;if(e.absolute||(n+=s.sx,i+=s.sy),e.scaleGrid&&(n=Math.round(n/e.scaleGrid)*e.scaleGrid,i=Math.round(i/e.scaleGrid)*e.scaleGrid),e.maxScale&&(n=Math.min(e.maxScale,n),i=Math.min(e.maxScale,i)),e.minScale&&(n=Math.max(e.minScale,n),i=Math.max(e.minScale,i)),e.center&&(o=e.center.x,a=e.center.y),n=this.clampScale(n),i=this.clampScale(i),o||a){const t=this.getTranslation(),e=o-(o-t.tx)*(n/s.sx),r=a-(a-t.ty)*(i/s.sy);e===t.tx&&r===t.ty||this.translate(e,r)}return this.scale(n,i),this}getRotation(){return Vb(this.getMatrix())}rotate(t,e,n){if(null==e||null==n){const t=Yb(this.graph.view.stage);e=t.width/2,n=t.height/2}const i=this.getMatrix().translate(e,n).rotate(t).translate(-e,-n);return this.setMatrix(i),this}getTranslation(){return Gb(this.getMatrix())}translate(t,e){const n=this.getMatrix();n.e=t||0,n.f=e||0,this.setMatrix(n);const i=this.getTranslation();return this.options.x=i.tx,this.options.y=i.ty,this.graph.trigger("translate",Object.assign({},i)),this}setOrigin(t,e){return this.translate(t||0,e||0)}fitToContent(t,e,n,i){if("object"===typeof t){const s=t;t=s.gridWidth||1,e=s.gridHeight||1,n=s.padding||0,i=s}else t=t||1,e=e||1,n=n||0,null==i&&(i={});const s=cm(n),r=i.border||0,o=i.contentArea?Ly.create(i.contentArea):this.getContentArea(i);r>0&&o.inflate(r);const a=this.getScale(),l=this.getTranslation(),c=a.sx,h=a.sy;o.x*=c,o.y*=h,o.width*=c,o.height*=h;let u=Math.max(Math.ceil((o.width+o.x)/t),1)*t,d=Math.max(Math.ceil((o.height+o.y)/e),1)*e,p=0,g=0;("negative"===i.allowNewOrigin&&o.x<0||"positive"===i.allowNewOrigin&&o.x>=0||"any"===i.allowNewOrigin)&&(p=Math.ceil(-o.x/t)*t,p+=s.left,u+=p),("negative"===i.allowNewOrigin&&o.y<0||"positive"===i.allowNewOrigin&&o.y>=0||"any"===i.allowNewOrigin)&&(g=Math.ceil(-o.y/e)*e,g+=s.top,d+=g),u+=s.right,d+=s.bottom,u=Math.max(u,i.minWidth||0),d=Math.max(d,i.minHeight||0),u=Math.min(u,i.maxWidth||Number.MAX_SAFE_INTEGER),d=Math.min(d,i.maxHeight||Number.MAX_SAFE_INTEGER);const f=this.getComputedSize(),m=u!==f.width||d!==f.height,y=p!==l.tx||g!==l.ty;return y&&this.translate(p,g),m&&this.resize(u,d),new Ly(-p/c,-g/h,u/c,d/h)}scaleContentToFit(t={}){this.scaleContentToFitImpl(t)}scaleContentToFitImpl(t={},e=!0){let n,i;if(t.contentArea){const e=t.contentArea;n=this.graph.localToGraph(e),i=jy.create(e)}else n=this.getContentBBox(t),i=this.graph.graphToLocal(n);if(!n.width||!n.height)return;const s=cm(t.padding),r=t.minScale||0,o=t.maxScale||Number.MAX_SAFE_INTEGER,a=t.minScaleX||r,l=t.maxScaleX||o,c=t.minScaleY||r,h=t.maxScaleY||o;let u;if(t.viewportArea)u=t.viewportArea;else{const t=this.getComputedSize(),e=this.getTranslation();u={x:e.tx,y:e.ty,width:t.width,height:t.height}}u=Ly.create(u).moveAndExpand({x:s.left,y:s.top,width:-s.left-s.right,height:-s.top-s.bottom});const d=this.getScale();let p=u.width/n.width*d.sx,g=u.height/n.height*d.sy;!1!==t.preserveAspectRatio&&(p=g=Math.min(p,g));const f=t.scaleGrid;if(f&&(p=f*Math.floor(p/f),g=f*Math.floor(g/f)),p=sm(p,a,l),g=sm(g,c,h),this.scale(p,g),e){const t=this.options,e=u.x-i.x*p-t.x,n=u.y-i.y*g-t.y;this.translate(e,n)}}getContentArea(t={}){return t.useCellGeometry?this.model.getAllCellsBBox()||new Ly:Yb(this.graph.view.stage)}getContentBBox(t={}){return this.graph.localToGraph(this.getContentArea(t))}getGraphArea(){const t=Ly.fromSize(this.getComputedSize());return this.graph.graphToLocal(t)}zoomToRect(t,e={}){const n=Ly.create(t),i=this.graph;e.contentArea=n,null==e.viewportArea&&(e.viewportArea={x:i.options.x,y:i.options.y,width:this.options.width,height:this.options.height}),this.scaleContentToFitImpl(e,!1);const s=n.getCenter();return this.centerPoint(s.x,s.y),this}zoomToFit(t={}){return this.zoomToRect(this.getContentArea(t),t)}centerPoint(t,e){const n=this.getComputedSize(),i=this.getScale(),s=this.getTranslation(),r=n.width/2,o=n.height/2;t="number"===typeof t?t:r,e="number"===typeof e?e:o,t=r-t*i.sx,e=o-e*i.sy,s.tx===t&&s.ty===e||this.translate(t,e)}centerContent(t){const e=this.graph.getContentArea(t),n=e.getCenter();this.centerPoint(n.x,n.y)}centerCell(t){return this.positionCell(t,"center")}positionPoint(t,e,n){const i=this.getComputedSize();e=am(e,Math.max(0,i.width)),e<0&&(e=i.width+e),n=am(n,Math.max(0,i.height)),n<0&&(n=i.height+n);const s=this.getTranslation(),r=this.getScale(),o=e-t.x*r.sx,a=n-t.y*r.sy;s.tx===o&&s.ty===a||this.translate(o,a)}positionRect(t,e){const n=Ly.create(t);switch(e){case"center":return this.positionPoint(n.getCenter(),"50%","50%");case"top":return this.positionPoint(n.getTopCenter(),"50%",0);case"top-right":return this.positionPoint(n.getTopRight(),"100%",0);case"right":return this.positionPoint(n.getRightMiddle(),"100%","50%");case"bottom-right":return this.positionPoint(n.getBottomRight(),"100%","100%");case"bottom":return this.positionPoint(n.getBottomCenter(),"50%","100%");case"bottom-left":return this.positionPoint(n.getBottomLeft(),0,"100%");case"left":return this.positionPoint(n.getLeftMiddle(),0,"50%");case"top-left":return this.positionPoint(n.getTopLeft(),0,0);default:return this}}positionCell(t,e){const n=t.getBBox();return this.positionRect(n,e)}positionContent(t,e){const n=this.graph.getContentArea(e);return this.positionRect(n,t)}dispose(){this.widgets.forEach((t=>t.dispose())),this.widgets.clear(),this.stopListening()}}jM([LM.dispose()],LM.prototype,"dispose",null);var FM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class BM extends jA{constructor(){super(...arguments),this.movedMap=new WeakMap,this.unselectMap=new WeakMap}get widgetOptions(){return this.options.selecting}get rubberbandDisabled(){return!0!==this.widgetOptions.enabled||!0!==this.widgetOptions.rubberband}get disabled(){return!0!==this.widgetOptions.enabled}get length(){return this.widget.length}get cells(){return this.widget.cells}init(){this.widget=this.graph.hook.createSelection(),this.startListening()}startListening(){this.graph.on("blank:mousedown",this.onBlankMouseDown,this),this.graph.on("blank:click",this.onBlankClick,this),this.graph.on("cell:mousemove",this.onCellMouseMove,this),this.graph.on("cell:mouseup",this.onCellMouseUp,this),this.widget.on("box:mousedown",this.onBoxMouseDown,this)}stopListening(){this.graph.off("blank:mousedown",this.onBlankMouseDown,this),this.graph.off("blank:click",this.onBlankClick,this),this.graph.off("cell:mousemove",this.onCellMouseMove,this),this.graph.off("cell:mouseup",this.onCellMouseUp,this),this.widget.off("box:mousedown",this.onBoxMouseDown,this)}onBlankMouseDown({e:t}){(this.allowRubberband(t,!0)||this.allowRubberband(t)&&!this.graph.scroller.allowPanning(t,!0)&&!this.graph.panning.allowPanning(t,!0))&&this.startRubberband(t)}onBlankClick(){this.clean()}allowRubberband(t,e){return!this.rubberbandDisabled&&EM.isMatch(t,this.widgetOptions.modifiers,e)&&this.graph.hook.allowRubberband(t)}onCellMouseMove({cell:t}){this.movedMap.set(t,!0)}onCellMouseUp({e:t,cell:e}){const n=this.widgetOptions;let i=this.disabled;!i&&this.movedMap.has(e)&&(i=!1===n.selectCellOnMoved,i||(i=!1===n.selectNodeOnMoved&&e.isNode()),i||(i=!1===n.selectEdgeOnMoved&&e.isEdge())),i||(!1===n.multiple||!t.ctrlKey&&!t.metaKey?this.reset(e):this.unselectMap.has(e)?this.unselectMap.delete(e):this.isSelected(e)?this.unselect(e):this.select(e)),this.movedMap.delete(e)}onBoxMouseDown({e:t,cell:e}){this.disabled||!1!==this.widgetOptions.multiple&&(t.ctrlKey||t.metaKey)&&(this.unselect(e),this.unselectMap.set(e,!0))}isEmpty(){return this.length<=0}isSelected(t){return this.widget.isSelected(t)}getCells(t){return(Array.isArray(t)?t:[t]).map((t=>"string"===typeof t?this.graph.getCellById(t):t)).filter((t=>null!=t))}select(t,e={}){const n=this.getCells(t);return n.length&&(this.isMultiple()?this.widget.select(n,e):this.reset(n.slice(0,1),e)),this}unselect(t,e={}){return this.widget.unselect(this.getCells(t),e),this}reset(t,e={}){return this.widget.reset(t?this.getCells(t):[],e),this}clean(t={}){return this.widget.clean(t),this}enable(){return this.disabled&&(this.widgetOptions.enabled=!0),this}disable(){return this.disabled||(this.widgetOptions.enabled=!1),this}startRubberband(t){return this.rubberbandDisabled||this.widget.startSelecting(t),this}enableRubberband(){return this.rubberbandDisabled&&(this.widgetOptions.rubberband=!0),this}disableRubberband(){return this.rubberbandDisabled||(this.widgetOptions.rubberband=!1),this}isMultiple(){return!1!==this.widgetOptions.multiple}enableMultiple(){return this.widgetOptions.multiple=!0,this}disableMultiple(){return this.widgetOptions.multiple=!1,this}setModifiers(t){return this.widgetOptions.modifiers=t,this}setContent(t){return this.widget.setContent(t),this}setFilter(t){return this.widget.setFilter(t),this}dispose(){this.stopListening(),this.widget.dispose()}}FM([jA.dispose()],BM.prototype,"dispose",null);var RM,$M=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},zM=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s0}canRedo(){return!this.disabled&&this.redoStack.length>0}validate(t,...e){return this.validator.validate(t,...e),this}dispose(){this.validator.dispose(),this.clean(),this.stopListening()}startListening(){this.model.on("batch:start",this.initBatchCommand,this),this.model.on("batch:stop",this.storeBatchCommand,this),this.options.eventNames&&this.options.eventNames.forEach(((t,e)=>{this.handlers[e]=this.addCommand.bind(this,t),this.model.on(t,this.handlers[e])})),this.validator.on("invalid",(t=>this.trigger("invalid",t)))}stopListening(){this.model.off("batch:start",this.initBatchCommand,this),this.model.off("batch:stop",this.storeBatchCommand,this),this.options.eventNames&&(this.options.eventNames.forEach(((t,e)=>{this.model.off(t,this.handlers[e])})),this.handlers.length=0),this.validator.off("invalid")}createCommand(t){return{batch:!!t&&t.batch,data:{}}}revertCommand(t,e){this.freezed=!0;const n=Array.isArray(t)?RM.sortBatchCommands(t):[t];for(let i=n.length-1;i>=0;i-=1){const t=n[i],s=Object.assign(Object.assign({},e),Pl(t.options,this.options.revertOptionsList||[]));this.executeCommand(t,!0,s)}this.freezed=!1}applyCommand(t,e){this.freezed=!0;const n=Array.isArray(t)?RM.sortBatchCommands(t):[t];for(let i=0;i=0&&(e||n)){const e=this.batchCommands.findIndex((e=>(o&&e.modelChange||e.data.id===r.id)&&e.event===t));e<0||RM.isAddEvent(t)||RM.isRemoveEvent(t)?a=this.createCommand({batch:!0}):(a=this.batchCommands[e],this.batchCommands.splice(e,1)),this.batchCommands.push(a),this.lastBatchIndex=this.batchCommands.length-1}}else a=this.createCommand({batch:!1});if(RM.isAddEvent(t)||RM.isRemoveEvent(t)){const e=a.data;return a.event=t,a.options=i,e.id=r.id,e.props=ku(r.toJSON()),r.isEdge()?e.edge=!0:r.isNode()&&(e.node=!0),this.push(a,i)}if(RM.isChangeEvent(t)){const n=e.key,s=a.data;return a.batch&&a.event||(a.event=t,a.options=i,s.key=n,null==s.prev&&(s.prev={}),s.prev[n]=Eu(r.previous(n)),o?a.modelChange=!0:s.id=r.id),null==s.next&&(s.next={}),s.next[n]=Eu(r.prop(n)),this.push(a,i)}const l=this.options.afterAddCommand;l&&Em(l,this,t,e,a),this.push(a,i)}initBatchCommand(t){this.freezed||(this.batchCommands?this.batchLevel+=1:(this.batchCommands=[this.createCommand({batch:!0})],this.batchLevel=0,this.lastBatchIndex=-1))}storeBatchCommand(t){if(!this.freezed)if(this.batchCommands&&this.batchLevel<=0){const e=this.filterBatchCommand(this.batchCommands);e.length>0&&(this.redoStack=[],this.undoStack.push(e),this.notify("add",e,t)),this.batchCommands=null,this.lastBatchIndex=-1,this.batchLevel=0}else this.batchCommands&&this.batchLevel>0&&(this.batchLevel-=1)}filterBatchCommand(t){let e=t.slice();const n=[];while(e.length>0){const t=e.shift(),i=t.event,s=t.data.id;if(null!=i&&(null!=s||t.modelChange)){if(RM.isAddEvent(i)){const t=e.findIndex((t=>RM.isRemoveEvent(t.event)&&t.data.id===s));if(t>=0){e=e.filter(((e,n)=>tRM.isAddEvent(t.event)&&t.data.id===s));if(t>=0){e.splice(t,1);continue}}else if(RM.isChangeEvent(i)){const e=t.data;if(Pc(e.prev,e.next))continue}n.push(t)}}return n}notify(t,e,n){const i=null==e?null:Array.isArray(e)?e:[e];this.emit(t,{cmds:i,options:n}),this.emit("change",{cmds:i,options:n})}push(t,e){this.redoStack=[],t.batch?(this.lastBatchIndex=Math.max(this.lastBatchIndex,0),this.emit("batch",{cmd:t,options:e})):(this.undoStack.push(t),this.notify("add",t,e))}}$M([px.dispose()],IM.prototype,"dispose",null),function(t){class e extends px{constructor(t){super(),this.map={},this.command=t.history,this.cancelInvalid=!1!==t.cancelInvalid,this.command.on("add",this.onCommandAdded,this)}onCommandAdded({cmds:t}){return Array.isArray(t)?t.every((t=>this.isValidCommand(t))):this.isValidCommand(t)}isValidCommand(t){if(t.options&&!1===t.options.validation)return!0;const e=t.event&&this.map[t.event]||[];let n=null;return e.forEach((e=>{let i=0;const s=r=>{const o=e[i];i+=1;try{if(!o)return void(n=r);o(r,t,s)}catch(r){s(r)}};s(n)})),!n||(this.cancelInvalid&&this.command.cancel(),this.emit("invalid",{err:n}),!1)}validate(t,...e){const n=Array.isArray(t)?t:t.split(/\s+/);return e.forEach((t=>{if("function"!==typeof t)throw new Error(`${n.join(" ")} requires callback functions.`)})),n.forEach((t=>{null==this.map[t]&&(this.map[t]=[]),this.map[t].push(e)})),this}dispose(){this.command.off("add",this.onCommandAdded,this)}}$M([px.dispose()],e.prototype,"dispose",null),t.Validator=e}(IM||(IM={})),function(t){function e(t){return"cell:added"===t}function n(t){return"cell:removed"===t}function i(t){return null!=t&&t.startsWith("cell:change:")}function s(e){const{graph:n}=e,i=zM(e,["graph"]),s=["cell:added","cell:removed","cell:change:*"],r=["batch:start","batch:stop"],o=e.eventNames?e.eventNames.filter((e=>!(t.isChangeEvent(e)||s.includes(e)||r.includes(e)))):s;return Object.assign(Object.assign({},i),{eventNames:o,applyOptionsList:e.applyOptionsList||["propertyPath"],revertOptionsList:e.revertOptionsList||["propertyPath"]})}function r(e){const n=[];for(let i=0,s=e.length;i=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class VM extends jA{get widgetOptions(){return this.options.minimap}init(){this.widget=this.graph.hook.createMiniMap()}dispose(){this.widget&&this.widget.dispose()}}_M([jA.dispose()],VM.prototype,"dispose",null);var GM=n(441),HM=n.n(GM),UM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class qM extends ux{constructor(t){super(),this.options=t;const e=this.graph.scroller.widget;this.container=e?e.container:this.graph.container,t.global?this.target=document:(this.target=this.container,this.disabled||this.target.setAttribute("tabindex","-1"),this.graph.on("cell:mouseup",this.focus,this),this.graph.on("blank:mouseup",this.focus,this)),this.mousetrap=qM.createMousetrap(this)}get graph(){return this.options.graph}get disabled(){return!0!==this.options.enabled}enable(){this.disabled&&(this.options.enabled=!0,this.graph.options.keyboard.enabled=!0,this.target instanceof HTMLElement&&this.target.setAttribute("tabindex","-1"))}disable(){this.disabled||(this.options.enabled=!1,this.graph.options.keyboard.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}on(t,e,n){this.mousetrap.bind(this.getKeys(t),e,n)}off(t,e){this.mousetrap.unbind(this.getKeys(t),e)}focus(t){const e=this.isInputEvent(t.e);if(e)return;const n=this.target;n.focus({preventScroll:!0})}getKeys(t){return(Array.isArray(t)?t:[t]).map((t=>this.formatkey(t)))}formatkey(t){const e=t.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command"),n=this.options.format;return n?Em(n,this.graph,e):e}isGraphEvent(t){const e=t.srcElement||t.target;return!!e&&(e===this.target||e===document.body||Km(this.container,e))}isInputEvent(t){const e=t.target,n=e&&e.tagName.toLowerCase();return"input"===n}isEnabledForEvent(t){const e=!this.disabled&&this.isGraphEvent(t),n=this.isInputEvent(t);if(e){const e=t.keyCode||t.which;if(n&&(8===e||46===e))return!1;if(this.options.guard)return Em(this.options.guard,this.graph,t)}return e}dispose(){this.mousetrap.reset()}}UM([ux.dispose()],qM.prototype,"dispose",null),function(t){function e(t){const e=new(HM())(t.target),n=e.stopCallback;return e.stopCallback=(i,s,r)=>!t.isEnabledForEvent(i)||!!n&&n.call(e,i,s,r),e}t.createMousetrap=e}(qM||(qM={}));var WM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class XM extends ux{constructor(t){super(),this.options=t,this.cumulatedFactor=1;const e=this.graph.scroller.widget;this.container=e?e.container:this.graph.container,this.target=this.options.global?document:this.container,this.mousewheelHandle=new hv(this.target,this.onMouseWheel.bind(this),this.allowMouseWheel.bind(this)),this.options.enabled&&this.enable(!0)}get graph(){return this.options.graph}get disabled(){return!0!==this.options.enabled}enable(t){(this.disabled||t)&&(this.options.enabled=!0,this.graph.options.mousewheel.enabled=!0,this.mousewheelHandle.enable())}disable(){this.disabled||(this.options.enabled=!1,this.graph.options.mousewheel.enabled=!1,this.mousewheelHandle.disable())}allowMouseWheel(t){const e=t.originalEvent||t,n=this.options.guard;return(null==n||n.call(this.graph,e))&&EM.isMatch(e,this.options.modifiers)}onMouseWheel(t){const e=t.originalEvent||t,n=this.options.guard;if((null==n||n.call(this.graph,e))&&EM.isMatch(e,this.options.modifiers)){const e=this.options.factor||1.2;null==this.currentScale&&(this.startPos={x:t.clientX,y:t.clientY},this.currentScale=this.graph.scroller.widget?this.graph.scroller.widget.zoom():this.graph.transform.getScale().sx);const n=t.deltaY;n<0?this.currentScale<.15?this.cumulatedFactor=(this.currentScale+.01)/this.currentScale:this.cumulatedFactor=Math.round(this.currentScale*e*20)/20/this.currentScale:this.currentScale<=.15?this.cumulatedFactor=(this.currentScale-.01)/this.currentScale:this.cumulatedFactor=Math.round(this.currentScale*(1/e)*20)/20/this.currentScale,this.cumulatedFactor=Math.max(.01,Math.min(this.currentScale*this.cumulatedFactor,160)/this.currentScale);const i=this.graph.scroller.widget,s=this.currentScale;let r=this.graph.transform.clampScale(s*this.cumulatedFactor);const o=this.options.minScale||Number.MIN_SAFE_INTEGER,a=this.options.maxScale||Number.MAX_SAFE_INTEGER;if(r=sm(r,o,a),r!==s)if(i)if(this.options.zoomAtMousePosition){const t=this.graph.coord.clientToLocalPoint(this.startPos);i.zoom(r,{absolute:!0,center:t.clone()})}else i.zoom(r,{absolute:!0});else if(this.options.zoomAtMousePosition){const t=this.graph.coord.clientToGraphPoint(this.startPos);this.graph.zoom(r,{absolute:!0,center:t.clone()})}else this.graph.zoom(r,{absolute:!0});this.currentScale=null,this.cumulatedFactor=1}}dispose(){this.disable()}}WM([ux.dispose()],XM.prototype,"dispose",null);var YM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class JM extends jA{show(t={}){const e=Object.assign(Object.assign({},JM.defaultOptions),t),n=this.createPrintPages(e);e.ready(n,(t=>this.showPrintWindow(t,e)),{sheetSize:this.getSheetSize(e)})}get className(){return this.view.prefixClassName("graph-print")}showPrintWindow(t,e){if(t){const n=v()(document.body),i=v()(this.view.container),s=this.view.prefixClassName("graph-printing");n.addClass(s);const r=i.children().detach();t.forEach((t=>{t.removeClass(`${this.className}-preview`).addClass(`${this.className}-ready`).appendTo(n)}));let o=!1;const a=()=>{o||(o=!0,n.removeClass(s),t.forEach((t=>t.remove())),i.append(r),v()(`#${this.styleSheetId}`).remove(),this.graph.trigger("after:print",e),v()(window).off("afterprint",a))};v()(window).one("afterprint",a),setTimeout(a,200),window.print()}}createPrintPage(t,e){this.graph.trigger("before:print",e);const n=v()("
").addClass(this.className),i=v()("
").addClass(this.view.prefixClassName("graph-print-inner")).css("position","relative");e.size&&n.addClass(`${this.className}-size-${e.size}`);const s=rb.create(this.view.svg).clone(),r=s.findOne(`.${this.view.prefixClassName("graph-svg-stage")}`);i.append(s.node);const o=this.getSheetSize(e),a=this.graph.transform.getGraphArea(),l=this.graph.transform.getScale(),c=this.graph.translate(),h=Lb().translate(c.tx/l.sx,c.ty/l.sy),u=this.getPageInfo(a,t,o),d=u.scale,p=u.bbox;return i.css({left:0,top:0}),s.attr({width:p.width*d,height:p.height*d,style:"position:relative",viewBox:[p.x,p.y,p.width,p.height].join(" ")}),r.attr("transform",Rb(h)),n.append(i),n.addClass(`${this.className}-preview`),{$page:n,sheetSize:o}}createPrintPages(t){let e;const n=this.getPrintArea(t),i=[];if(t.page){const s=this.getPageSize(n,t.page),r=this.getPageAreas(n,s);r.forEach((n=>{e=this.createPrintPage(n,t),i.push(e.$page)}))}else e=this.createPrintPage(n,t),i.push(e.$page);if(e){const n={width:e.sheetSize.cssWidth,height:e.sheetSize.cssHeight};this.updatePrintStyle(n,t)}return i}get styleSheetId(){return this.view.prefixClassName("graph-print-style")}updatePrintStyle(t,e){const n=Object.keys(t).reduce(((e,n)=>`${e} ${n}:${t[n]};`),""),i=cm(e.margin),s=e.marginUnit||"",r=e.sheetUnit||"",o=`\n @media print {\n .${this.className}.${this.className}-ready {\n ${n}\n }\n\n @page {\n margin:\n ${[i.top+s,i.right+s,i.bottom+s,i.left+s].join(" ")};\n size: ${e.sheet.width+r} ${e.sheet.height+r};\n\n .${this.className}.${this.className}-preview {\n ${n}\n }\n }`,a=this.styleSheetId,l=v()(`#${a}`);l.length?l.html(o):v()("head").append(`''`)}getPrintArea(t){let e=t.area;if(!e){const n=cm(t.padding);e=this.graph.getContentArea().moveAndExpand({x:-n.left,y:-n.top,width:n.left+n.right,height:n.top+n.bottom})}return e}getPageSize(t,e){if("object"===typeof e){const n=e,i={width:n.width,height:n.height};return null==i.width&&(i.width=Math.ceil(t.width/(n.columns||1))),null==i.height&&(i.height=Math.ceil(t.height/(n.rows||1))),i}return{width:t.width,height:t.height}}getPageAreas(t,e){const n=[],i=e.width,s=e.height;for(let r=0,o=0;re(t)}}(JM||(JM={}));class ZM extends jA{toSVG(t,e={}){this.graph.trigger("before:export",e);const n=this.view.svg,i=rb.create(n).clone();let s=i.node;const r=i.findOne(`.${this.view.prefixClassName("graph-svg-stage")}`),o=e.viewBox||this.graph.graphToLocal(this.graph.getContentBBox()),a=e.preserveDimensions;if(a){const t="boolean"===typeof a?o:a;i.attr({width:t.width,height:t.height})}if(i.removeAttribute("style").attr("viewBox",[o.x,o.y,o.width,o.height].join(" ")),r.removeAttribute("transform"),!1!==e.copyStyles){const t=n.ownerDocument,e=Array.from(n.querySelectorAll("*")),i=Array.from(s.querySelectorAll("*")),r=t.styleSheets.length,o=[];for(let n=r-1;n>=0;n-=1)o[n]=t.styleSheets[n],t.styleSheets[n].disabled=!0;const a={};e.forEach(((t,e)=>{const n=window.getComputedStyle(t,null),i={};Object.keys(n).forEach((t=>{i[t]=n.getPropertyValue(t)})),a[e]=i})),r!==t.styleSheets.length&&o.forEach(((e,n)=>{t.styleSheets[n]=e}));for(let n=0;n{const n=window.getComputedStyle(t,null),i=a[e],s={};Object.keys(n).forEach((t=>{rm(t)||n.getPropertyValue(t)===i[t]||(s[t]=n.getPropertyValue(t))})),l[e]=s})),i.forEach(((t,e)=>{v()(t).css(l[e])}))}const l=e.stylesheet;if("string"===typeof l){const t=n.ownerDocument.implementation.createDocument(null,"xml",null).createCDATASection(l);i.prepend(rb.create("style",{type:"text/css"},[t]))}const c=()=>{const n=e.beforeSerialize;if("function"===typeof n){const t=Em(n,this.graph,s);t instanceof SVGSVGElement&&(s=t)}const i=(new XMLSerializer).serializeToString(s).replace(/ /g," ");this.graph.trigger("after:export",e),t(i)};if(e.serializeImages){const t=i.find("image").map((t=>new Promise((e=>{const n=t.attr("xlink:href")||t.attr("href");by.imageToDataUri(n,((n,i)=>{!n&&i&&t.attr("xlink:href",i),e()}))}))));Promise.all(t).then(c)}else c()}toDataURL(t,e){let n=e.viewBox||this.graph.getContentBBox();const i=cm(e.padding);e.width&&e.height&&(i.left+i.right>=e.width&&(i.left=i.right=0),i.top+i.bottom>=e.height&&(i.top=i.bottom=0));const s=new Ly(-i.left,-i.top,i.left+i.right,i.top+i.bottom);if(e.width&&e.height){const t=n.width+i.left+i.right,r=n.height+i.top+i.bottom;s.scale(t/e.width,r/e.height)}n=Ly.create(n).moveAndExpand(s);const r="number"===typeof e.width&&"number"===typeof e.height?{width:e.width,height:e.height}:n;let o=e.ratio?parseFloat(e.ratio):1;Number.isFinite(o)&&0!==o||(o=1);const a={width:Math.max(Math.round(r.width*o),1),height:Math.max(Math.round(r.height*o),1)};{const t=document.createElement("canvas"),e=t.getContext("2d");t.width=a.width,t.height=a.height;const n=a.width-1,i=a.height-1;e.fillStyle="rgb(1,1,1)",e.fillRect(n,i,1,1);const s=e.getImageData(n,i,1,1).data;if(1!==s[0]||1!==s[1]||1!==s[2])throw new Error("size exceeded")}const l=new Image;l.onload=()=>{const n=document.createElement("canvas");n.width=a.width,n.height=a.height;const i=n.getContext("2d");i.fillStyle=e.backgroundColor||"white",i.fillRect(0,0,a.width,a.height);try{i.drawImage(l,0,0,a.width,a.height);const s=n.toDataURL(e.type,e.quality);t(s)}catch(s){}},this.toSVG((t=>{l.src=`data:image/svg+xml,${encodeURIComponent(t)}`}),Object.assign(Object.assign({},e),{viewBox:n,serializeImages:!0,preserveDimensions:Object.assign({},a)}))}toPNG(t,e={}){this.toDataURL(t,Object.assign(Object.assign({},e),{type:"image/png"}))}toJPEG(t,e={}){this.toDataURL(t,Object.assign(Object.assign({},e),{type:"image/jpeg"}))}}class KM extends jA{constructor(){super(...arguments),this.widgets=new Map}get isSelectionEnabled(){return!0===this.options.selecting.enabled}init(){this.startListening()}startListening(){this.graph.on("node:mouseup",this.onNodeMouseUp,this),this.graph.on("node:selected",this.onNodeSelected,this),this.graph.on("node:unselected",this.onNodeUnSelected,this)}stopListening(){this.graph.off("node:mouseup",this.onNodeMouseUp,this),this.graph.off("node:selected",this.onNodeSelected,this),this.graph.off("node:unselected",this.onNodeUnSelected,this)}onNodeMouseUp({node:t}){if(!this.isSelectionEnabled){const e=this.graph.hook.createKnob(t,{clearAll:!0});e&&this.widgets.set(t,e)}}onNodeSelected({node:t}){if(this.isSelectionEnabled){const e=this.graph.hook.createKnob(t,{clearAll:!1});e&&this.widgets.set(t,e)}}onNodeUnSelected({node:t}){if(this.isSelectionEnabled){const e=this.widgets.get(t);e&&e.forEach((t=>t.dispose())),this.widgets.delete(t)}}}var QM=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class tk extends jA{get widgetOptions(){return this.options.panning}get pannable(){return this.widgetOptions&&!0===this.widgetOptions.enabled}init(){this.startListening(),this.updateClassName()}startListening(){const t=this.widgetOptions.eventTypes;t&&(t.includes("leftMouseDown")&&(this.graph.on("blank:mousedown",this.preparePanning,this),this.graph.on("node:unhandled:mousedown",this.preparePanning,this),this.graph.on("edge:unhandled:mousedown",this.preparePanning,this)),t.includes("rightMouseDown")&&(this.onRightMouseDown=this.onRightMouseDown.bind(this),this.view.$(this.graph.container).on("mousedown",this.onRightMouseDown)),t.includes("mouseWheel")&&(this.mousewheelHandle=new hv(this.graph.container,this.onMouseWheel.bind(this),this.allowMouseWheel.bind(this)),this.mousewheelHandle.enable()))}stopListening(){const t=this.widgetOptions.eventTypes;t&&(t.includes("leftMouseDown")&&(this.graph.off("blank:mousedown",this.preparePanning,this),this.graph.off("node:unhandled:mousedown",this.preparePanning,this),this.graph.off("edge:unhandled:mousedown",this.preparePanning,this)),t.includes("rightMouseDown")&&this.view.$(this.graph.container).off("mousedown",this.onRightMouseDown),t.includes("mouseWheel")&&this.mousewheelHandle&&this.mousewheelHandle.disable())}preparePanning({e:t}){(this.allowPanning(t,!0)||this.allowPanning(t)&&!this.graph.selection.allowRubberband(t,!0))&&this.startPanning(t)}allowPanning(t,e){return this.pannable&&EM.isMatch(t,this.widgetOptions.modifiers,e)&&this.graph.hook.allowPanning(t)}startPanning(t){const e=this.view.normalizeEvent(t);this.clientX=e.clientX,this.clientY=e.clientY,this.panning=!0,this.updateClassName(),this.view.$(document.body).on({"mousemove.panning touchmove.panning":this.pan.bind(this),"mouseup.panning touchend.panning":this.stopPanning.bind(this),"mouseleave.panning":this.stopPanning.bind(this)}),this.view.$(window).on("mouseup.panning",this.stopPanning.bind(this))}pan(t){const e=this.view.normalizeEvent(t),n=e.clientX-this.clientX,i=e.clientY-this.clientY;this.clientX=e.clientX,this.clientY=e.clientY,this.graph.translateBy(n,i)}stopPanning(t){this.panning=!1,this.updateClassName(),this.view.$(document.body).off(".panning"),this.view.$(window).off(".panning")}updateClassName(){const t=this.view.container,e=this.view.prefixClassName("graph-panning"),n=this.view.prefixClassName("graph-pannable");this.pannable?this.panning?(jm(t,e),Lm(t,n)):(Lm(t,e),jm(t,n)):(Lm(t,e),Lm(t,n))}onRightMouseDown(t){2===t.button&&this.allowPanning(t,!0)&&this.startPanning(t)}allowMouseWheel(t){return this.pannable&&!t.ctrlKey}onMouseWheel(t,e,n){t.ctrlKey||this.graph.translateBy(-e,-n)}autoPanning(t,e){const n=10,i=this.graph.getGraphArea();let s=0,r=0;t<=i.left+n&&(s=-n),e<=i.top+n&&(r=-n),t>=i.right-n&&(s=n),e>=i.bottom-n&&(r=n),0===s&&0===r||this.graph.translateBy(-s,-r)}enablePanning(){this.pannable||(this.widgetOptions.enabled=!0,this.updateClassName())}disablePanning(){this.pannable&&(this.widgetOptions.enabled=!1,this.updateClassName())}dispose(){this.stopListening()}}QM([jA.dispose()],tk.prototype,"dispose",null);var ek=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class nk extends jA{hasScroller(){return null!=this.graph.scroller.widget}getContainer(){return this.hasScroller()?this.graph.scroller.widget.container:this.graph.container}init(){const t=this.options.autoResize;if(t){const e="boolean"===typeof t?this.getContainer():t;fv.bind(e,(()=>{const t=this.getContainer(),e=t.offsetWidth,n=t.offsetHeight;this.resize(e,n)}))}}resize(t,e){this.hasScroller()?this.resizeScroller(t,e):this.resizeGraph(t,e)}resizeGraph(t,e){this.graph.transform.resize(t,e)}resizeScroller(t,e){this.graph.scroller.resize(t,e)}resizePage(t,e){const n=this.graph.scroller.widget;n&&n.updatePageSize(t,e)}dispose(){fv.clear(this.getContainer())}}ek([jA.dispose()],nk.prototype,"dispose",null);var ik,sk=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o},rk=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s{const r=s.value,o=e||i;s.value=function(...e){const n=this.options[o];if(null!=n){this.getNativeValue=r.bind(this,...e);const i=Em(n,this.graph,...e);if(this.getNativeValue=null,null!=i||!0===t&&null===i)return i}return r.call(this,...e)}}}function n(t){return(e,n,i)=>{const s=i.value,r=t||n;i.value=function(...t){let e=s.call(this,...t);const n=this.options[r];return null!=n&&(e=Em(n,this.graph,...t)&&e),e}}}t.hook=e,t.after=n})(ik||(ik={}));class ok extends jA{createModel(){if(this.options.model)return this.options.model;const t=new bA;return t.graph=this.graph,t}createView(){return new BA(this.graph)}createRenderer(){return new nM(this.graph)}createDefsManager(){return new bM(this.graph)}createGridManager(){return new wM(this.graph)}createCoordManager(){return new xM(this.graph)}createKnobManager(){return new KM(this.graph)}createTransform(t,e){const n=this.getTransformOptions(t);return n.resizable||n.rotatable?new gM(Object.assign(Object.assign({node:t,graph:this.graph},n),e)):(n.clearAll&&gM.removeInstances(this.graph),null)}createKnob(t,e){const n=fM.parseOptionGroup(this.graph,t,this.options.knob),i=Object.assign(Object.assign({},n),e);i.clearAll&&WA.removeInstances(this.graph),i.clearAll=!1;const s=t.prop("knob"),r=[],o=Array.isArray(s)?s:[s];return o.forEach(((e,s)=>{e&&!1!==e.enabled&&("function"===typeof e.enabled&&!1===e.enabled.call(this.graph,t)||n.enabled&&r.push(new WA(Object.assign({node:t,index:s,graph:this.graph},i))))})),r}getTransformOptions(t){const e=fM.parseOptionGroup(this.graph,t,this.options.resizing),n=fM.parseOptionGroup(this.graph,t,this.options.rotating),i=fM.parseOptionGroup(this.graph,t,this.options.transforming),s=Object.assign(Object.assign({},i),{resizable:e.enabled,minWidth:e.minWidth,maxWidth:e.maxWidth,minHeight:e.minHeight,maxHeight:e.maxHeight,orthogonalResizing:e.orthogonal,restrictedResizing:null!=e.restrict?e.restrict:e.restricted,autoScrollOnResizing:e.autoScroll,preserveAspectRatio:e.preserveAspectRatio,allowReverse:e.allowReverse,rotatable:n.enabled,rotateGrid:n.grid});return s}createTransformManager(){return new LM(this.graph)}createHighlightManager(){return new NM(this.graph)}createBackgroundManager(){return new sM(this.graph)}createClipboard(){return new uk}createClipboardManager(){return new TM(this.graph)}createSnapline(){return new tM(Object.assign({graph:this.graph},this.options.snapline))}createSnaplineManager(){return new AM(this.graph)}createSelection(){return new pM(Object.assign({graph:this.graph},this.options.selecting))}createSelectionManager(){return new BM(this.graph)}allowRubberband(t){return!0}createHistoryManager(){return new IM(Object.assign({graph:this.graph},this.options.history))}createScroller(){return this.options.scroller.enabled?new lM(Object.assign({graph:this.graph},this.options.scroller)):null}createScrollerManager(){return new kM(this.graph)}allowPanning(t){return!0}createMiniMap(){const t=this.options.minimap,{enabled:e}=t,n=rk(t,["enabled"]);return e?new ZA(Object.assign({graph:this.graph},n)):null}createMiniMapManager(){return new VM(this.graph)}createKeyboard(){return new qM(Object.assign({graph:this.graph},this.options.keyboard))}createMouseWheel(){return new XM(Object.assign({graph:this.graph},this.options.mousewheel))}createPrintManager(){return new JM(this.graph)}createFormatManager(){return new ZM(this.graph)}createPanningManager(){return new tk(this.graph)}createSizeManager(){return new nk(this.graph)}allowConnectToBlank(t){const e=this.options.connecting,n=null!=e.allowBlank?e.allowBlank:e.dangling;if("function"!==typeof n)return!!n;const i=this.graph.findViewByCell(t),s=t.getSourceCell(),r=t.getTargetCell(),o=this.graph.findViewByCell(s),a=this.graph.findViewByCell(r);return Em(n,this.graph,{edge:t,edgeView:i,sourceCell:s,targetCell:r,sourceView:o,targetView:a,sourcePort:t.getSourcePortId(),targetPort:t.getTargetPortId(),sourceMagnet:i.sourceMagnet,targetMagnet:i.targetMagnet})}validateEdge(t,e,n){if(!this.allowConnectToBlank(t)){const e=t.getSourceCellId(),n=t.getTargetCellId();if(!e||!n)return!1}const i=this.options.connecting.validateEdge;return!i||Em(i,this.graph,{edge:t,type:e,previous:n})}validateMagnet(t,e,n){if("passive"!==e.getAttribute("magnet")){const i=this.options.connecting.validateMagnet;return!i||Em(i,this.graph,{e:n,magnet:e,view:t,cell:t.cell})}return!1}getDefaultEdge(t,e){let n;const i=this.options.connecting.createEdge;return i&&(n=Em(i,this.graph,{sourceMagnet:e,sourceView:t,sourceCell:t.cell})),null==n&&(n=new PA),n}validateConnection(t,e,n,i,s,r,o){const a=this.options.connecting,l=a.allowLoop,c=a.allowNode,h=a.allowEdge,u=a.allowPort,d=null!=a.allowMulti?a.allowMulti:a.multi,p=a.validateConnection,g=r?r.cell:null,f="target"===s?n:t,m="target"===s?i:e;let y=!0;const b=a=>{const l="source"===s?o?o.port:null:g?g.getSourcePortId():null,c="target"===s?o?o.port:null:g?g.getTargetPortId():null;return Em(a,this.graph,{edge:g,edgeView:r,sourceView:t,targetView:n,sourcePort:l,targetPort:c,sourceMagnet:e,targetMagnet:i,sourceCell:t?t.cell:null,targetCell:n?n.cell:null,type:s})};if(null!=l&&("boolean"===typeof l?l||t!==n||(y=!1):y=b(l)),y&&null!=u&&("boolean"===typeof u?!u&&m&&(y=!1):y=b(u)),y&&null!=h&&("boolean"===typeof h?!h&&pA.isEdgeView(f)&&(y=!1):y=b(h)),y&&null!=c&&("boolean"===typeof c?c||null==f||gA.isNodeView(f)&&null==m&&(y=!1):y=b(c)),y&&null!=d&&r){const t=r.cell,e="source"===s?o:t.getSource(),n="target"===s?o:t.getTarget(),i=o?this.graph.getCellById(o.cell):null;if(e&&n&&e.cell&&n.cell&&i)if("function"===typeof d)y=b(d);else{const t=this.model.getConnectedEdges(i,{outgoing:"source"===s,incoming:"target"===s});if(t.length)if("withPort"===d){const i=t.some((t=>{const i=t.getSource(),s=t.getTarget();return i&&s&&i.cell===e.cell&&s.cell===n.cell&&null!=i.port&&i.port===e.port&&null!=s.port&&s.port===n.port}));i&&(y=!1)}else if(!d){const i=t.some((t=>{const i=t.getSource(),s=t.getTarget();return i&&s&&i.cell===e.cell&&s.cell===n.cell}));i&&(y=!1)}}}return y&&null!=p&&(y=b(p)),y}getRestrictArea(t){const e=this.options.translating.restrict,n="function"===typeof e?Em(e,this.graph,t):e;return"number"===typeof n?this.graph.transform.getGraphArea().inflate(n):!0===n?this.graph.transform.getGraphArea():n||null}onViewUpdated(t,e,n){e&nM.FLAG_INSERT||n.mounting||this.graph.renderer.requestConnectedEdgesUpdate(t,n)}onViewPostponed(t,e,n){return this.graph.renderer.forcePostponedViewUpdate(t,e)}getCellView(t){return null}createCellView(t){const e={graph:this.graph},n=this.getCellView(t);if(n)return new n(t,e);const i=t.view;if(null!=i&&"string"===typeof i){const n=Rx.registry.get(i);return n?new n(t,e):Rx.registry.onNotFound(i)}return t.isNode()?new gA(t,e):t.isEdge()?new pA(t,e):null}getHTMLComponent(t){let e=t.getHTML();return"string"===typeof e&&(e=TA.componentRegistry.get(e)||e),pc(e)&&(e=e.render),"function"===typeof e?Em(e,this.graph,t):e}shouldUpdateHTMLComponent(t){let e=t.getHTML();if("string"===typeof e&&(e=TA.componentRegistry.get(e)||e),pc(e)){const n=e.shouldComponentUpdate;return"function"===typeof n?Em(n,this.graph,t):!!n}return!1}onEdgeLabelRendered(t){}onPortRendered(t){}onToolItemCreated(t){}}sk([ik.hook()],ok.prototype,"createModel",null),sk([ik.hook()],ok.prototype,"createView",null),sk([ik.hook()],ok.prototype,"createRenderer",null),sk([ik.hook()],ok.prototype,"createDefsManager",null),sk([ik.hook()],ok.prototype,"createGridManager",null),sk([ik.hook()],ok.prototype,"createCoordManager",null),sk([ik.hook()],ok.prototype,"createKnobManager",null),sk([ik.hook()],ok.prototype,"createTransform",null),sk([ik.hook()],ok.prototype,"createKnob",null),sk([ik.hook()],ok.prototype,"createTransformManager",null),sk([ik.hook()],ok.prototype,"createHighlightManager",null),sk([ik.hook()],ok.prototype,"createBackgroundManager",null),sk([ik.hook()],ok.prototype,"createClipboard",null),sk([ik.hook()],ok.prototype,"createClipboardManager",null),sk([ik.hook()],ok.prototype,"createSnapline",null),sk([ik.hook()],ok.prototype,"createSnaplineManager",null),sk([ik.hook()],ok.prototype,"createSelection",null),sk([ik.hook()],ok.prototype,"createSelectionManager",null),sk([ik.hook()],ok.prototype,"allowRubberband",null),sk([ik.hook()],ok.prototype,"createHistoryManager",null),sk([ik.hook()],ok.prototype,"createScroller",null),sk([ik.hook()],ok.prototype,"createScrollerManager",null),sk([ik.hook()],ok.prototype,"allowPanning",null),sk([ik.hook()],ok.prototype,"createMiniMap",null),sk([ik.hook()],ok.prototype,"createMiniMapManager",null),sk([ik.hook()],ok.prototype,"createKeyboard",null),sk([ik.hook()],ok.prototype,"createMouseWheel",null),sk([ik.hook()],ok.prototype,"createPrintManager",null),sk([ik.hook()],ok.prototype,"createFormatManager",null),sk([ik.hook()],ok.prototype,"createPanningManager",null),sk([ik.hook()],ok.prototype,"createSizeManager",null),sk([ik.after()],ok.prototype,"onViewUpdated",null),sk([ik.after()],ok.prototype,"onViewPostponed",null),sk([ik.hook()],ok.prototype,"getCellView",null),sk([ik.hook(!0)],ok.prototype,"createCellView",null),sk([ik.hook()],ok.prototype,"getHTMLComponent",null),sk([ik.hook()],ok.prototype,"shouldUpdateHTMLComponent",null),sk([ik.hook()],ok.prototype,"onEdgeLabelRendered",null),sk([ik.hook()],ok.prototype,"onPortRendered",null),sk([ik.hook()],ok.prototype,"onToolItemCreated",null);var ak,lk,ck=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class hk extends px{constructor(t){super(),this.options=fM.get(t),this.css=new zA(this),this.hook=new ok(this),this.view=this.hook.createView(),this.defs=this.hook.createDefsManager(),this.coord=this.hook.createCoordManager(),this.transform=this.hook.createTransformManager(),this.knob=this.hook.createKnobManager(),this.highlight=this.hook.createHighlightManager(),this.grid=this.hook.createGridManager(),this.background=this.hook.createBackgroundManager(),this.model=this.hook.createModel(),this.renderer=this.hook.createRenderer(),this.clipboard=this.hook.createClipboardManager(),this.snapline=this.hook.createSnaplineManager(),this.selection=this.hook.createSelectionManager(),this.history=this.hook.createHistoryManager(),this.scroller=this.hook.createScrollerManager(),this.minimap=this.hook.createMiniMapManager(),this.keyboard=this.hook.createKeyboard(),this.mousewheel=this.hook.createMouseWheel(),this.print=this.hook.createPrintManager(),this.format=this.hook.createFormatManager(),this.panning=this.hook.createPanningManager(),this.size=this.hook.createSizeManager()}get container(){return this.view.container}get[Symbol.toStringTag](){return hk.toStringTag}isNode(t){return t.isNode()}isEdge(t){return t.isEdge()}resetCells(t,e={}){return this.model.resetCells(t,e),this}clearCells(t={}){return this.model.clear(t),this}toJSON(t={}){return this.model.toJSON(t)}parseJSON(t){return this.model.parseJSON(t)}fromJSON(t,e={}){return this.model.fromJSON(t,e),this}getCellById(t){return this.model.getCell(t)}addNode(t,e={}){return this.model.addNode(t,e)}addNodes(t,e={}){return this.addCell(t.map((t=>tA.isNode(t)?t:this.createNode(t))),e)}createNode(t){return this.model.createNode(t)}removeNode(t,e={}){return this.model.removeCell(t,e)}addEdge(t,e={}){return this.model.addEdge(t,e)}addEdges(t,e={}){return this.addCell(t.map((t=>uA.isEdge(t)?t:this.createEdge(t))),e)}removeEdge(t,e={}){return this.model.removeCell(t,e)}createEdge(t){return this.model.createEdge(t)}addCell(t,e={}){return this.model.addCell(t,e),this}removeCell(t,e={}){return this.model.removeCell(t,e)}removeCells(t,e={}){return this.model.removeCells(t,e)}removeConnectedEdges(t,e={}){return this.model.removeConnectedEdges(t,e)}disconnectConnectedEdges(t,e={}){return this.model.disconnectConnectedEdges(t,e),this}hasCell(t){return this.model.has(t)}getCell(t){return this.model.getCell(t)}getCells(){return this.model.getCells()}getCellCount(){return this.model.total()}getNodes(){return this.model.getNodes()}getEdges(){return this.model.getEdges()}getOutgoingEdges(t){return this.model.getOutgoingEdges(t)}getIncomingEdges(t){return this.model.getIncomingEdges(t)}getConnectedEdges(t,e={}){return this.model.getConnectedEdges(t,e)}getRootNodes(){return this.model.getRoots()}getLeafNodes(){return this.model.getLeafs()}isRootNode(t){return this.model.isRoot(t)}isLeafNode(t){return this.model.isLeaf(t)}getNeighbors(t,e={}){return this.model.getNeighbors(t,e)}isNeighbor(t,e,n={}){return this.model.isNeighbor(t,e,n)}getSuccessors(t,e={}){return this.model.getSuccessors(t,e)}isSuccessor(t,e,n={}){return this.model.isSuccessor(t,e,n)}getPredecessors(t,e={}){return this.model.getPredecessors(t,e)}isPredecessor(t,e,n={}){return this.model.isPredecessor(t,e,n)}getCommonAncestor(...t){return this.model.getCommonAncestor(...t)}getSubGraph(t,e={}){return this.model.getSubGraph(t,e)}cloneSubGraph(t,e={}){return this.model.cloneSubGraph(t,e)}cloneCells(t){return this.model.cloneCells(t)}getNodesFromPoint(t,e){return this.model.getNodesFromPoint(t,e)}getNodesInArea(t,e,n,i,s){return this.model.getNodesInArea(t,e,n,i,s)}getNodesUnderNode(t,e={}){return this.model.getNodesUnderNode(t,e)}searchCell(t,e,n={}){return this.model.search(t,e,n),this}getShortestPath(t,e,n={}){return this.model.getShortestPath(t,e,n)}getAllCellsBBox(){return this.model.getAllCellsBBox()}getCellsBBox(t,e={}){return this.model.getCellsBBox(t,e)}startBatch(t,e={}){this.model.startBatch(t,e)}stopBatch(t,e={}){this.model.stopBatch(t,e)}batchUpdate(t,e,n){const i="string"===typeof t?t:"update",s="string"===typeof t?e:t,r="function"===typeof e?n:e;this.startBatch(i,r);const o=s();return this.stopBatch(i,r),o}updateCellId(t,e){return this.model.updateCellId(t,e)}isFrozen(){return this.renderer.isFrozen()}freeze(t={}){return this.renderer.freeze(t),this}unfreeze(t={}){return this.renderer.unfreeze(t),this}isAsync(){return this.renderer.isAsync()}setAsync(t){return this.renderer.setAsync(t),this}findView(t){return ZS.isCell(t)?this.findViewByCell(t):this.findViewByElem(t)}findViews(t){return Ly.isRectangleLike(t)?this.findViewsInArea(t):jy.isPointLike(t)?this.findViewsFromPoint(t):[]}findViewByCell(t){return this.renderer.findViewByCell(t)}findViewByElem(t){return this.renderer.findViewByElem(t)}findViewsFromPoint(t,e){const n="number"===typeof t?{x:t,y:e}:t;return this.renderer.findViewsFromPoint(n)}findViewsInArea(t,e,n,i,s){const r="number"===typeof t?{x:t,y:e,width:n,height:i}:t,o="number"===typeof t?s:e;return this.renderer.findViewsInArea(r,o)}isViewMounted(t){return this.renderer.isViewMounted(t)}getMountedViews(){return this.renderer.getMountedViews()}getUnmountedViews(){return this.renderer.getUnmountedViews()}matrix(t){return"undefined"===typeof t?this.transform.getMatrix():(this.transform.setMatrix(t),this)}resize(t,e){return this.size.resize(t,e),this}resizeGraph(t,e){return this.size.resizeGraph(t,e),this}resizeScroller(t,e){return this.size.resizeScroller(t,e),this}resizePage(t,e){return this.size.resizePage(t,e),this}scale(t,e=t,n=0,i=0){return"undefined"===typeof t?this.transform.getScale():(this.transform.scale(t,e,n,i),this)}zoom(t,e){const n=this.scroller.widget;if(n){if("undefined"===typeof t)return n.zoom();n.zoom(t,e)}else{if("undefined"===typeof t)return this.transform.getZoom();this.transform.zoom(t,e)}return this}zoomTo(t,e={}){const n=this.scroller.widget;n?n.zoom(t,Object.assign(Object.assign({},e),{absolute:!0})):this.transform.zoom(t,Object.assign(Object.assign({},e),{absolute:!0}))}zoomToRect(t,e={}){const n=this.scroller.widget;return n?n.zoomToRect(t,e):this.transform.zoomToRect(t,e),this}zoomToFit(t={}){const e=this.scroller.widget;return e?e.zoomToFit(t):this.transform.zoomToFit(t),this}rotate(t,e,n){return"undefined"===typeof t?this.transform.getRotation():(this.transform.rotate(t,e,n),this)}translate(t,e){return"undefined"===typeof t?this.transform.getTranslation():(this.transform.translate(t,e),this)}translateBy(t,e){const n=this.translate(),i=n.tx+t,s=n.ty+e;return this.translate(i,s)}getArea(){return this.transform.getGraphArea()}getGraphArea(){return this.transform.getGraphArea()}getContentArea(t={}){return this.transform.getContentArea(t)}getContentBBox(t={}){return this.transform.getContentBBox(t)}fitToContent(t,e,n,i){return this.transform.fitToContent(t,e,n,i)}scaleContentToFit(t={}){return this.transform.scaleContentToFit(t),this}center(t){return this.centerPoint(t)}centerPoint(t,e,n){const i=this.scroller.widget;return i?i.centerPoint(t,e,n):this.transform.centerPoint(t,e),this}centerContent(t){const e=this.scroller.widget;return e?e.centerContent(t):this.transform.centerContent(t),this}centerCell(t,e){const n=this.scroller.widget;return n?n.centerCell(t,e):this.transform.centerCell(t),this}positionPoint(t,e,n,i={}){const s=this.scroller.widget;return s?s.positionPoint(t,e,n,i):this.transform.positionPoint(t,e,n),this}positionRect(t,e,n){const i=this.scroller.widget;return i?i.positionRect(t,e,n):this.transform.positionRect(t,e),this}positionCell(t,e,n){const i=this.scroller.widget;return i?i.positionCell(t,e,n):this.transform.positionCell(t,e),this}positionContent(t,e){const n=this.scroller.widget;return n?n.positionContent(t,e):this.transform.positionContent(t,e),this}getClientMatrix(){return this.coord.getClientMatrix()}getClientOffset(){return this.coord.getClientOffset()}getPageOffset(){return this.coord.getPageOffset()}snapToGrid(t,e){return this.coord.snapToGrid(t,e)}pageToLocal(t,e,n,i){return Ly.isRectangleLike(t)?this.coord.pageToLocalRect(t):"number"===typeof t&&"number"===typeof e&&"number"===typeof n&&"number"===typeof i?this.coord.pageToLocalRect(t,e,n,i):this.coord.pageToLocalPoint(t,e)}localToPage(t,e,n,i){return Ly.isRectangleLike(t)?this.coord.localToPageRect(t):"number"===typeof t&&"number"===typeof e&&"number"===typeof n&&"number"===typeof i?this.coord.localToPageRect(t,e,n,i):this.coord.localToPagePoint(t,e)}clientToLocal(t,e,n,i){return Ly.isRectangleLike(t)?this.coord.clientToLocalRect(t):"number"===typeof t&&"number"===typeof e&&"number"===typeof n&&"number"===typeof i?this.coord.clientToLocalRect(t,e,n,i):this.coord.clientToLocalPoint(t,e)}localToClient(t,e,n,i){return Ly.isRectangleLike(t)?this.coord.localToClientRect(t):"number"===typeof t&&"number"===typeof e&&"number"===typeof n&&"number"===typeof i?this.coord.localToClientRect(t,e,n,i):this.coord.localToClientPoint(t,e)}localToGraph(t,e,n,i){return Ly.isRectangleLike(t)?this.coord.localToGraphRect(t):"number"===typeof t&&"number"===typeof e&&"number"===typeof n&&"number"===typeof i?this.coord.localToGraphRect(t,e,n,i):this.coord.localToGraphPoint(t,e)}graphToLocal(t,e,n,i){return Ly.isRectangleLike(t)?this.coord.graphToLocalRect(t):"number"===typeof t&&"number"===typeof e&&"number"===typeof n&&"number"===typeof i?this.coord.graphToLocalRect(t,e,n,i):this.coord.graphToLocalPoint(t,e)}clientToGraph(t,e,n,i){return Ly.isRectangleLike(t)?this.coord.clientToGraphRect(t):"number"===typeof t&&"number"===typeof e&&"number"===typeof n&&"number"===typeof i?this.coord.clientToGraphRect(t,e,n,i):this.coord.clientToGraphPoint(t,e)}defineFilter(t){return this.defs.filter(t)}defineGradient(t){return this.defs.gradient(t)}defineMarker(t){return this.defs.marker(t)}getGridSize(){return this.grid.getGridSize()}setGridSize(t){return this.grid.setGridSize(t),this}showGrid(){return this.grid.show(),this}hideGrid(){return this.grid.hide(),this}clearGrid(){return this.grid.clear(),this}drawGrid(t){return this.grid.draw(t),this}updateBackground(){return this.background.update(),this}drawBackground(t,e){const n=this.scroller.widget;return null==n||null!=this.options.background&&e?this.background.draw(t):n.backgroundManager.draw(t),this}clearBackground(t){const e=this.scroller.widget;return null==e||null!=this.options.background&&t?this.background.clear():e.backgroundManager.clear(),this}isClipboardEnabled(){return!this.clipboard.disabled}enableClipboard(){return this.clipboard.enable(),this}disableClipboard(){return this.clipboard.disable(),this}toggleClipboard(t){return null!=t?t!==this.isClipboardEnabled()&&(t?this.enableClipboard():this.disableClipboard()):this.isClipboardEnabled()?this.disableClipboard():this.enableClipboard(),this}isClipboardEmpty(){return this.clipboard.isEmpty()}getCellsInClipboard(){return this.clipboard.cells}cleanClipboard(){return this.clipboard.clean(),this}copy(t,e={}){return this.clipboard.copy(t,e),this}cut(t,e={}){return this.clipboard.cut(t,e),this}paste(t={},e=this){return this.clipboard.paste(t,e)}isHistoryEnabled(){return!this.history.disabled}enableHistory(){return this.history.enable(),this}disableHistory(){return this.history.disable(),this}toggleHistory(t){return null!=t?t!==this.isHistoryEnabled()&&(t?this.enableHistory():this.disableHistory()):this.isHistoryEnabled()?this.disableHistory():this.enableHistory(),this}undo(t={}){return this.history.undo(t),this}undoAndCancel(t={}){return this.history.cancel(t),this}redo(t={}){return this.history.redo(t),this}canUndo(){return this.history.canUndo()}canRedo(){return this.history.canRedo()}cleanHistory(t={}){this.history.clean(t)}isKeyboardEnabled(){return!this.keyboard.disabled}enableKeyboard(){return this.keyboard.enable(),this}disableKeyboard(){return this.keyboard.disable(),this}toggleKeyboard(t){return null!=t?t!==this.isKeyboardEnabled()&&(t?this.enableKeyboard():this.disableKeyboard()):this.isKeyboardEnabled()?this.disableKeyboard():this.enableKeyboard(),this}bindKey(t,e,n){return this.keyboard.on(t,e,n),this}unbindKey(t,e){return this.keyboard.off(t,e),this}isMouseWheelEnabled(){return!this.mousewheel.disabled}enableMouseWheel(){return this.mousewheel.enable(),this}disableMouseWheel(){return this.mousewheel.disable(),this}toggleMouseWheel(t){return null==t?this.isMouseWheelEnabled()?this.disableMouseWheel():this.enableMouseWheel():t?this.enableMouseWheel():this.disableMouseWheel(),this}isPannable(){const t=this.scroller.widget;return t?this.scroller.pannable:this.panning.pannable}enablePanning(){const t=this.scroller.widget;return t?this.scroller.enablePanning():this.panning.enablePanning(),this}disablePanning(){const t=this.scroller.widget;return t?this.scroller.disablePanning():this.panning.disablePanning(),this}togglePanning(t){return null==t?this.isPannable()?this.disablePanning():this.enablePanning():t!==this.isPannable()&&(t?this.enablePanning():this.disablePanning()),this}lockScroller(){var t;null===(t=this.scroller.widget)||void 0===t||t.lock()}unlockScroller(){var t;null===(t=this.scroller.widget)||void 0===t||t.unlock()}updateScroller(){var t;null===(t=this.scroller.widget)||void 0===t||t.update()}getScrollbarPosition(){const t=this.scroller.widget;return t.scrollbarPosition()}setScrollbarPosition(t,e,n){const i=this.scroller.widget;return i.scrollbarPosition(t,e,n),this}scrollToPoint(t,e,n){const i=this.scroller.widget;return i.scrollToPoint(t,e,n),this}scrollToContent(t){const e=this.scroller.widget;return e.scrollToContent(t),this}scrollToCell(t,e){const n=this.scroller.widget;return n.scrollToCell(t,e),this}transitionToPoint(t,e,n){const i=this.scroller.widget;return i.transitionToPoint(t,e,n),this}transitionToRect(t,e={}){const n=this.scroller.widget;return n.transitionToRect(t,e),this}isSelectionEnabled(){return!this.selection.disabled}enableSelection(){return this.selection.enable(),this}disableSelection(){return this.selection.disable(),this}toggleSelection(t){return null!=t?t!==this.isSelectionEnabled()&&(t?this.enableSelection():this.disableSelection()):this.isSelectionEnabled()?this.disableSelection():this.enableSelection(),this}isMultipleSelection(){return this.selection.isMultiple()}enableMultipleSelection(){return this.selection.enableMultiple(),this}disableMultipleSelection(){return this.selection.disableMultiple(),this}toggleMultipleSelection(t){return null!=t?t!==this.isMultipleSelection()&&(t?this.enableMultipleSelection():this.disableMultipleSelection()):this.isMultipleSelection()?this.disableMultipleSelection():this.enableMultipleSelection(),this}isSelectionMovable(){return!1!==this.selection.widget.options.movable}enableSelectionMovable(){return this.selection.widget.options.movable=!0,this}disableSelectionMovable(){return this.selection.widget.options.movable=!1,this}toggleSelectionMovable(t){return null!=t?t!==this.isSelectionMovable()&&(t?this.enableSelectionMovable():this.disableSelectionMovable()):this.isSelectionMovable()?this.disableSelectionMovable():this.enableSelectionMovable(),this}isRubberbandEnabled(){return!this.selection.rubberbandDisabled}enableRubberband(){return this.selection.enableRubberband(),this}disableRubberband(){return this.selection.disableRubberband(),this}toggleRubberband(t){return null!=t?t!==this.isRubberbandEnabled()&&(t?this.enableRubberband():this.disableRubberband()):this.isRubberbandEnabled()?this.disableRubberband():this.enableRubberband(),this}isStrictRubberband(){return!0===this.selection.widget.options.strict}enableStrictRubberband(){return this.selection.widget.options.strict=!0,this}disableStrictRubberband(){return this.selection.widget.options.strict=!1,this}toggleStrictRubberband(t){return null!=t?t!==this.isStrictRubberband()&&(t?this.enableStrictRubberband():this.disableStrictRubberband()):this.isStrictRubberband()?this.disableStrictRubberband():this.enableStrictRubberband(),this}setRubberbandModifiers(t){this.selection.setModifiers(t)}setSelectionFilter(t){return this.selection.setFilter(t),this}setSelectionDisplayContent(t){return this.selection.setContent(t),this}isSelectionEmpty(){return this.selection.isEmpty()}cleanSelection(t){return this.selection.clean(t),this}resetSelection(t,e){return this.selection.reset(t,e),this}getSelectedCells(){return this.selection.cells}getSelectedCellCount(){return this.selection.length}isSelected(t){return this.selection.isSelected(t)}select(t,e){return this.selection.select(t,e),this}unselect(t,e){return this.selection.unselect(t,e),this}isSnaplineEnabled(){return!this.snapline.widget.disabled}enableSnapline(){return this.snapline.widget.enable(),this}disableSnapline(){return this.snapline.widget.disable(),this}toggleSnapline(t){if(null==t)return this.isSnaplineEnabled()?this.disableSnapline():this.enableSnapline(),this;t!==this.isSnaplineEnabled()&&(t?this.enableSnapline():this.disableSnapline())}hideSnapline(){return this.snapline.widget.hide(),this}setSnaplineFilter(t){return this.snapline.widget.setFilter(t),this}isSnaplineOnResizingEnabled(){return!0===this.snapline.widget.options.resizing}enableSnaplineOnResizing(){return this.snapline.widget.options.resizing=!0,this}disableSnaplineOnResizing(){return this.snapline.widget.options.resizing=!1,this}toggleSnaplineOnResizing(t){return null!=t?t!==this.isSnaplineOnResizingEnabled()&&(t?this.enableSnaplineOnResizing():this.disableSnaplineOnResizing()):this.isSnaplineOnResizingEnabled()?this.disableSnaplineOnResizing():this.enableSnaplineOnResizing(),this}isSharpSnapline(){return!0===this.snapline.widget.options.sharp}enableSharpSnapline(){return this.snapline.widget.options.sharp=!0,this}disableSharpSnapline(){return this.snapline.widget.options.sharp=!1,this}toggleSharpSnapline(t){return null!=t?t!==this.isSharpSnapline()&&(t?this.enableSharpSnapline():this.disableSharpSnapline()):this.isSharpSnapline()?this.disableSharpSnapline():this.enableSharpSnapline(),this}getSnaplineTolerance(){return this.snapline.widget.options.tolerance}setSnaplineTolerance(t){return this.snapline.widget.options.tolerance=t,this}removeTools(){return this.emit("tools:remove"),this}hideTools(){return this.emit("tools:hide"),this}showTools(){return this.emit("tools:show"),this}toSVG(t,e={}){this.format.toSVG(t,e)}toDataURL(t,e){this.format.toDataURL(t,e)}toPNG(t,e={}){this.format.toPNG(t,e)}toJPEG(t,e={}){this.format.toJPEG(t,e)}printPreview(t){this.print.show(t)}dispose(){this.clearCells(),this.off(),this.css.dispose(),this.hook.dispose(),this.defs.dispose(),this.grid.dispose(),this.coord.dispose(),this.transform.dispose(),this.knob.dispose(),this.highlight.dispose(),this.background.dispose(),this.clipboard.dispose(),this.snapline.dispose(),this.selection.dispose(),this.history.dispose(),this.keyboard.dispose(),this.mousewheel.dispose(),this.print.dispose(),this.format.dispose(),this.minimap.dispose(),this.panning.dispose(),this.scroller.dispose(),this.view.dispose(),this.renderer.dispose(),this.size.dispose()}}ck([LA.checkScroller()],hk.prototype,"lockScroller",null),ck([LA.checkScroller()],hk.prototype,"unlockScroller",null),ck([LA.checkScroller()],hk.prototype,"updateScroller",null),ck([LA.checkScroller()],hk.prototype,"getScrollbarPosition",null),ck([LA.checkScroller()],hk.prototype,"setScrollbarPosition",null),ck([LA.checkScroller()],hk.prototype,"scrollToPoint",null),ck([LA.checkScroller()],hk.prototype,"scrollToContent",null),ck([LA.checkScroller()],hk.prototype,"scrollToCell",null),ck([LA.checkScroller()],hk.prototype,"transitionToPoint",null),ck([LA.checkScroller()],hk.prototype,"transitionToRect",null),ck([px.dispose()],hk.prototype,"dispose",null),function(t){t.View=BA,t.Hook=ok,t.Renderer=nM,t.Keyboard=qM,t.MouseWheel=XM,t.BaseManager=jA,t.DefsManager=bM,t.GridManager=wM,t.CoordManager=xM,t.PrintManager=JM,t.FormatManager=ZM,t.MiniMapManager=VM,t.HistoryManager=IM,t.SnaplineManager=AM,t.ScrollerManager=kM,t.ClipboardManager=TM,t.TransformManager=LM,t.HighlightManager=NM,t.BackgroundManager=sM,t.SelectionManager=BM}(hk||(hk={})),function(t){function e(e){if(null==e)return!1;if(e instanceof t)return!0;const n=e[Symbol.toStringTag],i=e;return(null==n||n===t.toStringTag)&&null!=i.hook&&null!=i.view&&null!=i.model}t.toStringTag=`X6.${t.name}`,t.isGraph=e}(hk||(hk={})),function(t){function e(e,n){const i=e instanceof HTMLElement?new t({container:e}):new t(e);return null!=n&&i.fromJSON(n),i}t.render=e}(hk||(hk={})),function(t){t.registerNode=tA.registry.register,t.registerEdge=uA.registry.register,t.registerView=Rx.registry.register,t.registerAttr=YC.registry.register,t.registerGrid=tw.registry.register,t.registerFilter=gw.registry.register,t.registerNodeTool=tE.registry.register,t.registerEdgeTool=eE.registry.register,t.registerBackground=vw.registry.register,t.registerHighlighter=Pw.registry.register,t.registerPortLayout=Gw.registry.register,t.registerPortLabelLayout=ax.registry.register,t.registerMarker=NC.registry.register,t.registerRouter=MS.registry.register,t.registerConnector=HS.registry.register,t.registerAnchor=CE.registry.register,t.registerEdgeAnchor=kE.registry.register,t.registerConnectionPoint=BE.registry.register,t.registerConnectionStrategy=Dx.registry.register,t.registerHTMLComponent=TA.componentRegistry.register}(hk||(hk={})),function(t){t.unregisterNode=tA.registry.unregister,t.unregisterEdge=uA.registry.unregister,t.unregisterView=Rx.registry.unregister,t.unregisterAttr=YC.registry.unregister,t.unregisterGrid=tw.registry.unregister,t.unregisterFilter=gw.registry.unregister,t.unregisterNodeTool=tE.registry.unregister,t.unregisterEdgeTool=eE.registry.unregister,t.unregisterBackground=vw.registry.unregister,t.unregisterHighlighter=Pw.registry.unregister,t.unregisterPortLayout=Gw.registry.unregister,t.unregisterPortLabelLayout=ax.registry.unregister,t.unregisterMarker=NC.registry.unregister,t.unregisterRouter=MS.registry.unregister,t.unregisterConnector=HS.registry.unregister,t.unregisterAnchor=CE.registry.unregister,t.unregisterEdgeAnchor=kE.registry.unregister,t.unregisterConnectionPoint=BE.registry.unregister,t.unregisterConnectionStrategy=Dx.registry.unregister,t.unregisterHTMLComponent=TA.componentRegistry.unregister}(hk||(hk={}));class uk{constructor(){this.cells=[]}copy(t,e,n={}){this.options=Object.assign({},n);const i=bA.isModel(e)?e:e.model,s=i.cloneSubGraph(t,n);this.cells=Ha(Object.keys(s).map((t=>s[t])),(t=>t.isEdge()?2:1)),this.serialize(n)}cut(t,e,n={}){this.copy(t,e,n);const i=hk.isGraph(e)?e.model:e;i.batchUpdate("cut",(()=>{t.forEach((t=>t.remove()))}))}paste(t,e={}){const n=Object.assign(Object.assign({},this.options),e),{offset:i,edgeProps:s,nodeProps:r}=n;let o=20,a=20;i&&(o="number"===typeof i?i:i.dx,a="number"===typeof i?i:i.dy),this.deserialize(n);const l=this.cells;l.forEach((t=>{t.model=null,t.removeProp("zIndex"),(o||a)&&t.translate(o,a),r&&t.isNode()&&t.prop(r),s&&t.isEdge()&&t.prop(s)}));const c=hk.isGraph(t)?t.model:t;return c.batchUpdate("paste",(()=>{c.addCells(this.cells)})),this.copy(l,t,e),l}serialize(t){!1!==t.useLocalStorage&&ak.save(this.cells)}deserialize(t){if(t.useLocalStorage){const t=ak.fetch();t&&(this.cells=t)}}isEmpty(){return this.cells.length<=0}clean(){this.options={},this.cells=[],ak.clean()}}(function(t){const e=`${Cw.prefixCls}.clipboard.cells`;function n(t){if(window.localStorage){const n=t.map((t=>t.toJSON()));localStorage.setItem(e,JSON.stringify(n))}}function i(){if(window.localStorage){const t=localStorage.getItem(e),n=t?JSON.parse(t):[];if(n)return bA.fromJSON(n)}}function s(){window.localStorage&&localStorage.removeItem(e)}t.save=n,t.fetch=i,t.clean=s})(ak||(ak={}));class dk{constructor(t){this.halo=t}get options(){return this.halo.options}get graph(){return this.halo.graph}get model(){return this.halo.model}get view(){return this.halo.view}get cell(){return this.halo.cell}get node(){return this.cell}getPresets(){return{className:"type-node",handles:[{name:"remove",position:"nw",events:{mousedown:this.removeCell.bind(this)},icon:null},{name:"resize",position:"se",events:{mousedown:this.startResize.bind(this),mousemove:this.doResize.bind(this),mouseup:this.stopResize.bind(this)},icon:null},{name:"clone",position:"n",events:{mousedown:this.startClone.bind(this),mousemove:this.doClone.bind(this),mouseup:this.stopClone.bind(this)},icon:null},{name:"link",position:"e",events:{mousedown:this.startLink.bind(this),mousemove:this.doLink.bind(this),mouseup:this.stopLink.bind(this)},icon:null},{name:"fork",position:"ne",events:{mousedown:this.startFork.bind(this),mousemove:this.doFork.bind(this),mouseup:this.stopFork.bind(this)},icon:null},{name:"unlink",position:"w",events:{mousedown:this.unlink.bind(this)},icon:null},{name:"rotate",position:"sw",events:{mousedown:this.startRotate.bind(this),mousemove:this.doRotate.bind(this),mouseup:this.stopRotate.bind(this)},icon:null}],bbox(t){if(this.options.useCellGeometry){const e=t.cell;return e.getBBox()}return t.getBBox()},content(t){const e=ug("x: <%= x %>, y: <%= y %>, width: <%= width %>, height: <%= height %>, angle: <%= angle %>"),n=t.cell,i=n.getBBox();return e({x:Math.floor(i.x),y:Math.floor(i.y),width:Math.floor(i.width),height:Math.floor(i.height),angle:Math.floor(n.getAngle())})},magnet(t){return t.container},tinyThreshold:40,smallThreshold:80,loopEdgePreferredSide:"top",loopEdgeWidth:40,rotateGrid:15,rotateEmbeds:!1}}removeCell(){this.model.removeConnectedEdges(this.cell),this.cell.remove()}startLink({x:t,y:e}){this.halo.startBatch();const n=this.graph,i=this.createEdgeConnectedToSource();i.setTarget({x:t,y:e}),this.model.addEdge(i,{validation:!1,halo:this.halo.cid,async:!1}),n.view.undelegateEvents(),this.edgeView=n.renderer.findViewByCell(i),this.edgeView.prepareArrowheadDragging("target",{x:t,y:e,fallbackAction:"remove"})}createEdgeConnectedToSource(){const t=this.getMagnet(this.view,"source"),e=this.getEdgeTerminal(this.view,t),n=this.graph.hook.getDefaultEdge(this.view,t);return n.setSource(e),n}getMagnet(t,e){const n=this.options.magnet;if("function"===typeof n){const i=Em(n,this.halo,t,e);if(i instanceof SVGElement)return i}throw new Error("`magnet()` has to return an SVGElement")}getEdgeTerminal(t,e){const n={cell:t.cell.id};if(e!==t.container){const i=e.getAttribute("port");i?n.port=i:n.selector=t.getSelector(e)}return n}doLink({e:t,x:e,y:n}){this.edgeView&&this.edgeView.onMouseMove(t,e,n)}stopLink({e:t,x:e,y:n}){const i=this.edgeView;if(i){i.onMouseUp(t,e,n);const s=i.cell;s.hasLoop()&&this.makeLoopEdge(s),this.halo.stopBatch(),this.halo.trigger("action:edge:addde",{edge:s}),this.edgeView=null}this.graph.view.delegateEvents()}makeLoopEdge(t){let e=null,n=null;const i=this.options.loopEdgeWidth,s=this.graph.options,r=new Ly(0,0,s.width,s.height),o=this.graph.graphToLocal(this.view.getBBox()),a=[this.options.loopEdgePreferredSide,"top","bottom","left","right"].some((t=>{let s=null,a=0,l=0;switch(t){case"top":s=new jy(o.x+o.width/2,o.y-i),a=i/2;break;case"bottom":s=new jy(o.x+o.width/2,o.y+o.height+i),a=i/2;break;case"left":s=new jy(o.x-i,o.y+o.height/2),l=i/2;break;case"right":s=new jy(o.x+o.width+i,o.y+o.height/2),l=i/2;break;default:break}return!!s&&(e=s.translate(-a,-l),n=s.translate(a,l),r.containsPoint(e)&&r.containsPoint(n))}));a&&e&&n&&t.setVertices([e,n])}startResize({e:t}){this.halo.startBatch(),this.flip=[1,0,0,1,1,0,0,1][Math.floor(Ay.normalize(this.node.getAngle())/45)],this.view.addClass("node-resizing"),cM("node:resize",t,this.view)}doResize({e:t,dx:e,dy:n}){const i=this.node.getSize(),s=Math.max(i.width+(this.flip?e:n),1),r=Math.max(i.height+(this.flip?n:e),1);this.node.resize(s,r,{absolute:!0}),cM("node:resizing",t,this.view)}stopResize({e:t}){this.view.removeClass("node-resizing"),cM("node:resized",t,this.view),this.halo.stopBatch()}startClone({e:t,x:e,y:n}){this.halo.startBatch();const i=this.options,s=i.clone(this.cell,{clone:!0});if(!ZS.isCell(s))throw new Error("option 'clone()' has to return a cell");this.centerNodeAtCursor(s,e,n),this.model.addCell(s,{halo:this.halo.cid,async:!1});const r=this.graph.renderer.findViewByCell(s);r.onMouseDown(t,e,n),this.halo.setEventData(t,{cloneView:r})}centerNodeAtCursor(t,e,n){const i=t.getBBox().getCenter(),s=e-i.x,r=n-i.y;t.translate(s,r)}doClone({e:t,x:e,y:n}){const i=this.halo.getEventData(t).cloneView;i&&i.onMouseMove(t,e,n)}stopClone({e:t,x:e,y:n}){const i=this.halo.getEventData(t).cloneView;i&&i.onMouseUp(t,e,n),this.halo.stopBatch()}startFork({e:t,x:e,y:n}){this.halo.startBatch();const i=this.options.clone(this.cell,{fork:!0});if(!ZS.isCell(i))throw new Error("option 'clone()' has to return a cell");this.centerNodeAtCursor(i,e,n),this.model.addCell(i,{halo:this.halo.cid,async:!1});const s=this.createEdgeConnectedToSource(),r=this.graph.renderer.findViewByCell(i),o=this.getMagnet(r,"target"),a=this.getEdgeTerminal(r,o);s.setTarget(a),this.model.addEdge(s,{halo:this.halo.cid,async:!1}),r.onMouseDown(t,e,n),this.halo.setEventData(t,{cloneView:r})}doFork({e:t,x:e,y:n}){const i=this.halo.getEventData(t).cloneView;i&&i.onMouseMove(t,e,n)}stopFork({e:t,x:e,y:n}){const i=this.halo.getEventData(t).cloneView;i&&i.onMouseUp(t,e,n),this.halo.stopBatch()}startRotate({e:t,x:e,y:n}){this.halo.startBatch();const i=this.node.getBBox().getCenter(),s=[this.node];this.options.rotateEmbeds&&this.node.getDescendants({deep:!0}).reduce(((t,e)=>(e.isNode()&&t.push(e),t)),s),this.halo.setEventData(t,{center:i,nodes:s,rotateStartAngles:s.map((t=>t.getAngle())),clientStartAngle:new jy(e,n).theta(i)}),s.forEach((e=>{const n=this.graph.findViewByCell(e);n&&(n.addClass("node-rotating"),cM("node:rotate",t,n))}))}doRotate({e:t,x:e,y:n}){const i=this.halo.getEventData(t),s=i.clientStartAngle-new jy(e,n).theta(i.center);i.nodes.forEach(((e,n)=>{const r=i.rotateStartAngles[n],o=ww.snapToGrid(r+s,this.options.rotateGrid);e.rotate(o,{absolute:!0,center:i.center,halo:this.halo.cid}),cM("node:rotating",t,this.graph.findViewByCell(e))}))}stopRotate({e:t}){const e=this.halo.getEventData(t);e.nodes.forEach((e=>{const n=this.graph.findViewByCell(e);n.removeClass("node-rotating"),cM("node:rotated",t,n)})),this.halo.stopBatch()}unlink(){this.halo.startBatch(),this.model.removeConnectedEdges(this.cell),this.halo.stopBatch()}}class pk{constructor(t){this.halo=t}get options(){return this.halo.options}get graph(){return this.halo.graph}get model(){return this.halo.model}get view(){return this.halo.view}get cell(){return this.halo.cell}get edge(){return this.cell}getPresets(){return{className:"type-edge",handles:[{name:"remove",position:"nw",icon:null,events:{mousedown:this.removeEdge.bind(this)}},{name:"direction",position:"se",icon:null,events:{mousedown:this.directionSwap.bind(this)}}],content:!1,bbox(t){return t.graph.localToGraph(t.getPointAtRatio(.5))},tinyThreshold:-1,smallThreshold:-1}}removeEdge(){this.cell.remove()}directionSwap(){const t=this.edge.getSource(),e=this.edge.getTarget();this.edge.prop({source:e,target:t})}}class gk extends qA{get type(){return this.options.type||"surround"}get handleOptions(){return this.options}init(t){this.options=kc(gk.defaultOptions,this.cell.isNode()?new dk(this).getPresets():this.cell.isEdge()?new pk(this).getPresets():null,t),this.render(),this.initHandles(),this.update(),this.startListening()}startListening(){const t=this.model,e=this.graph,n=this.view.cell;n.on("removed",this.remove,this),t.on("reseted",this.remove,this),e.on("halo:destroy",this.remove,this),t.on("*",this.update,this),e.on("scale",this.update,this),e.on("translate",this.update,this),super.startListening()}stopListening(){const t=this.model,e=this.graph,n=this.view.cell;this.undelegateEvents(),n.off("removed",this.remove,this),t.off("reseted",this.remove,this),e.off("halo:destroy",this.remove,this),t.off("*",this.update,this),e.off("scale",this.update,this),e.off("translate",this.update,this),super.stopListening()}render(){const t=this.options,e=this.prefixClassName("widget-halo");return this.view.addClass(lk.NODE_CLS),this.container=document.createElement("div"),this.$container=this.$(this.container).addClass(e).attr("data-shape",this.view.cell.shape),t.className&&this.$container.addClass(t.className),this.$handleContainer=this.$("
").addClass(`${e}-handles`).appendTo(this.container),this.$content=this.$("
").addClass(`${e}-content`).appendTo(this.container),this.$container.appendTo(this.graph.container),this}remove(){return this.stopBatch(),this.view.removeClass(lk.NODE_CLS),super.remove()}update(){if(this.isRendered()){this.updateContent();const t=this.getBBox(),e=this.options.tinyThreshold||0,n=this.options.smallThreshold||0;this.$handleContainer.toggleClass(`${this.handleClassName}-tiny`,t.width0;this.$handleContainer.children(".unlink").toggleClass("hidden",!t)}startBatch(){this.model.startBatch("halo",{halo:this.cid})}stopBatch(){this.model.hasActiveBatch("halo")&&this.model.stopBatch("halo",{halo:this.cid})}}(function(t){t.defaultOptions={type:"surround",clearAll:!0,clearOnBlankMouseDown:!0,useCellGeometry:!1,clone:t=>t.clone().removeZIndex()}})(gk||(gk={})),Object.getOwnPropertyNames(VA.prototype).forEach((t=>{"constructor"!==t&&Object.defineProperty(gk.prototype,t,Object.getOwnPropertyDescriptor(VA.prototype,t))})),function(t){t.NODE_CLS="has-widget-halo"}(lk||(lk={}));var fk,mk,yk,bk=function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(e,n,o):s(e,n))||o);return r>3&&o&&Object.defineProperty(e,n,o),o};class vk extends Ex{constructor(t){super(),this.options=Object.assign(Object.assign({},vk.defaults),t),this.container=document.createElement("div"),this.$container=this.$(this.container).addClass(this.prefixClassName("widget-dnd")),this.draggingGraph=new hk(Object.assign(Object.assign({},this.options.delegateGraphOptions),{container:document.createElement("div"),width:1,height:1})),this.$container.append(this.draggingGraph.container)}get targetScroller(){const t=this.options.target;return hk.isGraph(t)?t.scroller.widget:t}get targetGraph(){const t=this.options.target;return hk.isGraph(t)?t:t.graph}get targetModel(){return this.targetGraph.model}get snapline(){return this.targetGraph.snapline.widget}start(t,e){const n=e;n.preventDefault(),this.targetModel.startBatch("dnd"),this.$container.addClass("dragging").appendTo(this.options.containerParent||document.body),this.sourceNode=t,this.prepareDragging(t,n.clientX,n.clientY);const i=this.updateNodePosition(n.clientX,n.clientY);this.isSnaplineEnabled()&&(this.snapline.captureCursorOffset({e:n,node:t,cell:t,view:this.draggingView,x:i.x,y:i.y}),this.draggingNode.on("change:position",this.snap,this)),this.delegateDocumentEvents(vk.documentEvents,n.data)}isSnaplineEnabled(){return this.snapline&&!this.snapline.disabled}prepareDragging(t,e,n){const i=this.draggingGraph,s=i.model,r=this.options.getDragNode(t,{sourceNode:t,draggingGraph:i,targetGraph:this.targetGraph});r.position(0,0);let o=5;if(this.isSnaplineEnabled()&&(o+=this.snapline.options.tolerance||0),this.isSnaplineEnabled()||this.options.scaled){const t=this.targetGraph.transform.getScale();i.scale(t.sx,t.sy),o*=Math.max(t.sx,t.sy)}else i.scale(1,1);this.clearDragging(),this.options.animation&&this.$container.stop(!0,!0),s.resetCells([r]);const a=i.findViewByCell(r);a.undelegateEvents(),a.cell.off("changed"),i.fitToContent({padding:o,allowNewOrigin:"any"});const l=a.getBBox();this.geometryBBox=a.getBBox({useCellGeometry:!0}),this.delta=this.geometryBBox.getTopLeft().diff(l.getTopLeft()),this.draggingNode=r,this.draggingView=a,this.draggingBBox=r.getBBox(),this.padding=o,this.originOffset=this.updateGraphPosition(e,n)}updateGraphPosition(t,e){const n=document.body.scrollTop||document.documentElement.scrollTop,i=this.delta,s=this.geometryBBox,r=this.padding||5,o={left:t-i.x-s.width/2-r,top:e-i.y-s.height/2-r+n};return this.draggingGraph&&this.$container.offset(o),o}updateNodePosition(t,e){const n=this.targetGraph.clientToLocal(t,e),i=this.draggingBBox;return n.x-=i.width/2,n.y-=i.height/2,this.draggingNode.position(n.x,n.y),n}snap({cell:t,current:e,options:n}){const i=t;if(n.snapped){const t=this.draggingBBox;i.position(t.x+n.tx,t.y+n.ty,{silent:!0}),this.draggingView.translate(),i.position(e.x,e.y,{silent:!0}),this.snapOffset={x:n.tx,y:n.ty}}else this.snapOffset=null}onDragging(t){const e=this.draggingView;if(e){t.preventDefault();const n=this.normalizeEvent(t),i=n.clientX,s=n.clientY;this.updateGraphPosition(i,s);const r=this.updateNodePosition(i,s),o=this.targetGraph.options.embedding.enabled,a=(o||this.isSnaplineEnabled())&&this.isInsideValidArea({x:i,y:s});if(o){e.setEventData(n,{graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView});const t=e.getEventData(n);a?e.processEmbedding(n,t):e.clearEmbedding(t),this.candidateEmbedView=t.candidateEmbedView}this.isSnaplineEnabled()&&(a?this.snapline.snapOnMoving({e:n,view:e,x:r.x,y:r.y}):this.snapline.hide())}}onDragEnd(t){const e=this.draggingNode;if(e){const n=this.normalizeEvent(t),i=this.draggingView,s=this.draggingBBox,r=this.snapOffset;let o=s.x,a=s.y;r&&(o+=r.x,a+=r.y),e.position(o,a,{silent:!0});const l=this.drop(e,{x:n.clientX,y:n.clientY}),c=t=>{t?(this.onDropped(e),this.targetGraph.options.embedding.enabled&&i&&(i.setEventData(n,{cell:t,graph:this.targetGraph,candidateEmbedView:this.candidateEmbedView}),i.finalizeEmbedding(n,i.getEventData(n)))):this.onDropInvalid(),this.candidateEmbedView=null,this.targetModel.stopBatch("dnd")};Am(l)?(this.undelegateDocumentEvents(),l.then(c)):c(l)}}clearDragging(){this.draggingNode&&(this.sourceNode=null,this.draggingNode.remove(),this.draggingNode=null,this.draggingView=null,this.delta=null,this.padding=null,this.snapOffset=null,this.originOffset=null,this.undelegateDocumentEvents())}onDropped(t){this.draggingNode===t&&(this.clearDragging(),this.$container.removeClass("dragging").remove())}onDropInvalid(){const t=this.draggingNode;if(t){const e=this.options.animation;if(e){const n="object"===typeof e&&e.duration||150,i="object"===typeof e&&e.easing||"swing";this.draggingView=null,this.$container.animate(this.originOffset,n,i,(()=>this.onDropped(t)))}else this.onDropped(t)}}isInsideValidArea(t){let e;const n=this.targetGraph,i=this.targetScroller;if(i)if(i.options.autoResize)e=this.getDropArea(i.container);else{const t=this.getDropArea(i.container);e=this.getDropArea(n.container).intersectsWithRect(t)}else e=this.getDropArea(n.container);return e&&e.containsPoint(t)}getDropArea(t){const e=this.$(t),n=e.offset(),i=document.body.scrollTop||document.documentElement.scrollTop,s=document.body.scrollLeft||document.documentElement.scrollLeft;return Ly.create({x:n.left+parseInt(e.css("border-left-width"),10)-s,y:n.top+parseInt(e.css("border-top-width"),10)-i,width:e.innerWidth(),height:e.innerHeight()})}drop(t,e){if(this.isInsideValidArea(e)){const n=this.targetGraph,i=n.model,s=n.clientToLocal(e),r=this.sourceNode,o=this.options.getDropNode(t,{sourceNode:r,draggingNode:t,targetGraph:this.targetGraph,draggingGraph:this.draggingGraph}),a=o.getBBox();s.x+=a.x-a.width/2,s.y+=a.y-a.height/2;const l=this.snapOffset?1:n.getGridSize();o.position(ww.snapToGrid(s.x,l),ww.snapToGrid(s.y,l)),o.removeZIndex();const c=this.options.validateNode,h=!c||c(o,{sourceNode:r,draggingNode:t,droppingNode:o,targetGraph:n,draggingGraph:this.draggingGraph});return"boolean"===typeof h?h?(i.addCell(o,{stencil:this.cid}),o):null:km(h).then((t=>t?(i.addCell(o,{stencil:this.cid}),o):null))}return null}onRemove(){this.draggingGraph&&(this.draggingGraph.view.remove(),this.draggingGraph.dispose())}dispose(){this.remove()}}function Ck(t,e={}){const n=bA.isModel(t)?t:(new bA).resetCells(t,{sort:!1,dryrun:!0}),i=n.getNodes(),s=e.columns||1,r=Math.ceil(i.length/s),o=e.dx||0,a=e.dy||0,l=!1!==e.center,c=!0===e.resizeToFit,h=e.marginX||0,u=e.marginY||0,d=[];let p=e.columnWidth;if("compact"===p)for(let b=0;b{const i=n%s,r=Math.floor(n/s),h=d[i],u=f[r];let p=0,m=0,b=t.getSize();if(c){let n=h-2*o,i=u-2*a;const s=b.height*(b.width?n/b.width:1),r=b.width*(b.height?i/b.height:1);ut.clone(),getDropNode:t=>t.clone()},t.documentEvents={mousemove:"onDragging",touchmove:"onDragging",mouseup:"onDragEnd",touchend:"onDragEnd",touchcancel:"onDragEnd"}}(vk||(vk={})),function(t){function e(t,e){return t.reduce(((t,n)=>Math.max(n.getSize()[e],t)),0)}function n(t,e,n){const i=[];for(let s=n*e,r=s+n;s(t.push(t[n]+e),t)),[e||0])}t.getMaxDim=e,t.getNodesInRow=n,t.getNodesInColumn=i,t.accumulate=s}(fk||(fk={}));class wk extends Ex{constructor(t){if(super(),this.graphs={},this.$groups={},this.options=Object.assign(Object.assign({},wk.defaultOptions),t),this.dnd=new vk(this.options),this.onSearch=mm(this.onSearch,200),this.container=document.createElement("div"),this.$container=this.$(this.container).addClass(this.prefixClassName(mk.base)).attr("data-not-found-text",this.options.notFoundText||"No matches found"),this.options.collapsable=t.collapsable&&t.groups&&t.groups.some((t=>!1!==t.collapsable)),this.options.collapsable){this.$container.addClass("collapsable");const e=t.groups&&t.groups.every((t=>t.collapsed||!1===t.collapsable));e&&this.$container.addClass("collapsed")}this.$("
").addClass(this.prefixClassName(mk.title)).html(this.options.title).appendTo(this.$container),t.search&&this.$container.addClass("searchable").append(this.renderSearch()),this.$content=this.$("
").addClass(this.prefixClassName(mk.content)).appendTo(this.$container);const e=t.stencilGraphOptions||{};if(t.groups&&t.groups.length)t.groups.forEach((n=>{const i=this.$("
").addClass(this.prefixClassName(mk.group)).attr("data-name",n.name);(null==n.collapsable&&t.collapsable||!1!==n.collapsable)&&i.addClass("collapsable"),i.toggleClass("collapsed",!0===n.collapsed);const s=this.$("

").addClass(this.prefixClassName(mk.groupTitle)).html(n.title||n.name),r=this.$("
").addClass(this.prefixClassName(mk.groupContent)),o=n.graphOptions,a=new hk(Object.assign(Object.assign(Object.assign({},e),o),{container:document.createElement("div"),model:e.model||new bA,width:n.graphWidth||t.stencilGraphWidth,height:n.graphHeight||t.stencilGraphHeight,interacting:!1,preventDefaultBlankAction:!1}));r.append(a.container),i.append(s,r).appendTo(this.$content),this.$groups[n.name]=i,this.graphs[n.name]=a}));else{const n=new hk(Object.assign(Object.assign({},e),{container:document.createElement("div"),model:e.model||new bA,width:t.stencilGraphWidth,height:t.stencilGraphHeight,interacting:!1,preventDefaultBlankAction:!1}));this.$content.append(n.container),this.graphs[yk.defaultGroupName]=n}return this.startListening(),this}get targetScroller(){const t=this.options.target;return hk.isGraph(t)?t.scroller.widget:t}get targetGraph(){const t=this.options.target;return hk.isGraph(t)?t:t.graph}get targetModel(){return this.targetGraph.model}renderSearch(){return this.$("
").addClass(this.prefixClassName(mk.search)).append(this.$("").attr({type:"search",placeholder:this.options.placeholder||"Search"}).addClass(this.prefixClassName(mk.searchText)))}startListening(){const t=this.prefixClassName(mk.title),e=this.prefixClassName(mk.searchText),n=this.prefixClassName(mk.groupTitle);this.delegateEvents({[`click .${t}`]:"onTitleClick",[`touchstart .${t}`]:"onTitleClick",[`click .${n}`]:"onGroupTitleClick",[`touchstart .${n}`]:"onGroupTitleClick",[`input .${e}`]:"onSearch",[`focusin .${e}`]:"onSearchFocusIn",[`focusout .${e}`]:"onSearchFocusOut"}),Object.keys(this.graphs).forEach((t=>{const e=this.graphs[t];e.on("cell:mousedown",this.onDragStart,this)}))}stopListening(){this.undelegateEvents(),Object.keys(this.graphs).forEach((t=>{const e=this.graphs[t];e.off("cell:mousedown",this.onDragStart,this)}))}load(t,e){return Array.isArray(t)?this.loadGroup(t,e):this.options.groups&&Object.keys(this.options.groups).forEach((e=>{t[e]&&this.loadGroup(t[e],e)})),this}loadGroup(t,e){const n=this.getModel(e);if(n){const e=t.map((t=>tA.isNode(t)?t:tA.create(t)));n.resetCells(e)}const i=this.getGroup(e);let s=this.options.stencilGraphHeight;i&&null!=i.graphHeight&&(s=i.graphHeight);const r=i&&i.layout||this.options.layout;if(r&&n&&Em(r,this,n,i),!s){const t=this.getGraph(e);t.fitToContent({minWidth:t.options.width,gridHeight:1,padding:i&&i.graphPadding||this.options.stencilGraphPadding||10})}return this}onDragStart(t){const{e:e,node:n}=t;this.dnd.start(n,e)}filter(t,e){const n=Object.keys(this.graphs).reduce(((n,i)=>{const s=this.graphs[i],r=i===yk.defaultGroupName?null:i,o=s.model.getNodes().filter((n=>{let i=!1;i="function"===typeof e?Em(e,this,n,t,r,this):"boolean"===typeof e?e:this.isCellMatched(n,t,e,t.toLowerCase()!==t);const o=s.renderer.findViewByCell(n);return o&&o.$(o.container).toggleClass("unmatched",!i),i})),a=o.length>0,l=this.options,c=new bA;return c.resetCells(o),l.layout&&Em(l.layout,this,c,this.getGroup(i)),this.$groups[i]&&this.$groups[i].toggleClass("unmatched",!a),s.fitToContent({gridWidth:1,gridHeight:1,padding:l.stencilGraphPadding||10}),n||a}),!1);this.$container.toggleClass("not-found",!n)}isCellMatched(t,e,n,i){return!e||!n||Object.keys(n).some((s=>{if("*"===s||t.shape===s){const r=n[s];if("boolean"===typeof r)return r;const o=Array.isArray(r)?r:[r];return o.some((n=>{let s=t.getPropByPath(n);return null!=s&&(s=`${s}`,i||(s=s.toLowerCase()),s.indexOf(e)>=0)}))}return!1}))}onSearch(t){this.filter(t.target.value,this.options.search)}onSearchFocusIn(){this.$container.addClass("is-focused")}onSearchFocusOut(){this.$container.removeClass("is-focused")}onTitleClick(){this.options.collapsable&&(this.$container.toggleClass("collapsed"),this.$container.hasClass("collapsed")?this.collapseGroups():this.expandGroups())}onGroupTitleClick(t){const e=this.$(t.target).closest(`.${this.prefixClassName(mk.group)}`);this.toggleGroup(e.attr("data-name")||"");const n=Object.keys(this.$groups).every((t=>{const e=this.getGroup(t),n=this.$groups[t];return e&&!1===e.collapsable||n.hasClass("collapsed")}));this.$container.toggleClass("collapsed",n)}getModel(t){const e=this.getGraph(t);return e?e.model:null}getGraph(t){return this.graphs[t||yk.defaultGroupName]}getGroup(t){const e=this.options.groups;return null!=t&&e&&e.length?e.find((e=>e.name===t)):null}toggleGroup(t){return this.isGroupCollapsed(t)?this.expandGroup(t):this.collapseGroup(t),this}collapseGroup(t){if(this.isGroupCollapsable(t)){const e=this.$groups[t];e&&!this.isGroupCollapsed(t)&&(this.trigger("group:collapse",{name:t}),e.addClass("collapsed"))}return this}expandGroup(t){if(this.isGroupCollapsable(t)){const e=this.$groups[t];e&&this.isGroupCollapsed(t)&&(this.trigger("group:expand",{name:t}),e.removeClass("collapsed"))}return this}isGroupCollapsable(t){const e=this.$groups[t];return e.hasClass("collapsable")}isGroupCollapsed(t){const e=this.$groups[t];return e&&e.hasClass("collapsed")}collapseGroups(){return Object.keys(this.$groups).forEach((t=>this.collapseGroup(t))),this}expandGroups(){return Object.keys(this.$groups).forEach((t=>this.expandGroup(t))),this}resizeGroup(t,e){const n=this.graphs[t];return n&&n.resize(e.width,e.height),this}onRemove(){Object.keys(this.graphs).forEach((t=>{const e=this.graphs[t];e.view.remove(),delete this.graphs[t]})),this.dnd.remove(),this.stopListening(),this.undelegateDocumentEvents()}}(function(t){t.defaultOptions=Object.assign({stencilGraphWidth:200,stencilGraphHeight:800,title:"Stencil",collapsable:!1,placeholder:"Search",notFoundText:"No matches found",layout(t,e){const n={columnWidth:this.options.stencilGraphWidth/2-10,columns:2,rowHeight:80,resizeToFit:!1,dx:10,dy:10};Ck(t,Object.assign(Object.assign(Object.assign({},n),this.options.layoutOptions),e?e.layoutOptions:{}))}},vk.defaults)})(wk||(wk={})),function(t){t.base="widget-stencil",t.title=`${t.base}-title`,t.search=`${t.base}-search`,t.searchText=`${t.search}-text`,t.content=`${t.base}-content`,t.group=`${t.base}-group`,t.groupTitle=`${t.group}-title`,t.groupContent=`${t.group}-content`}(mk||(mk={})),function(t){t.defaultGroupName="__default__"}(yk||(yk={}));const xk="1.31.3";function Ek(){if(Cw.trackable){const t="https://kcart.alipay.com/web/bi.do",e=new Image,n=Object.assign(Object.assign({},Cw.trackInfo),{version:xk,pg:document.URL,r:(new Date).getTime(),x6:!0,page_type:"syslog"}),i=encodeURIComponent(JSON.stringify([n]));e.src=`${t}?BIProfile=merge&d=${i}`}}Cw.trackable&&setTimeout(Ek,3e3)},262:function(t,e,n){"use strict";n.d(e,{Bj:function(){return r},Fl:function(){return _t},IU:function(){return kt},Jd:function(){return E},PG:function(){return Et},SU:function(){return Rt},Um:function(){return Ct},WL:function(){return zt},X$:function(){return k},X3:function(){return Mt},Xl:function(){return Ot},dq:function(){return jt},iH:function(){return Lt},j:function(){return A},lk:function(){return S},qj:function(){return vt},qq:function(){return v},yT:function(){return At}});var i=n(577);let s;class r{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&s&&(this.parent=s,this.index=(s.scopes||(s.scopes=[])).push(this)-1)}run(t){if(this.active){const e=s;try{return s=this,t()}finally{s=e}}else 0}on(){s=this}off(){s=this.parent}stop(t){if(this.active){let e,n;for(e=0,n=this.effects.length;e{const e=new Set(t);return e.w=0,e.n=0,e},l=t=>(t.w&g)>0,c=t=>(t.n&g)>0,h=({deps:t})=>{if(t.length)for(let e=0;e{const{deps:e}=t;if(e.length){let n=0;for(let i=0;i{("length"===e||e>=s)&&c.push(t)}));else switch(void 0!==n&&c.push(l.get(n)),e){case"add":(0,i.kJ)(t)?(0,i.S0)(n)&&c.push(l.get("length")):(c.push(l.get(y)),(0,i._N)(t)&&c.push(l.get(b)));break;case"delete":(0,i.kJ)(t)||(c.push(l.get(y)),(0,i._N)(t)&&c.push(l.get(b)));break;case"set":(0,i._N)(t)&&c.push(l.get(y));break}if(1===c.length)c[0]&&O(c[0]);else{const t=[];for(const e of c)e&&t.push(...e);O(a(t))}}function O(t,e){for(const n of(0,i.kJ)(t)?t:[...t])(n!==m||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const P=(0,i.fY)("__proto__,__v_isRef,__isVue"),T=new Set(Object.getOwnPropertyNames(Symbol).map((t=>Symbol[t])).filter(i.yk)),D=B(),N=B(!1,!0),j=B(!0),L=F();function F(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const n=kt(this);for(let e=0,s=this.length;e{t[e]=function(...t){E();const n=kt(this)[e].apply(this,t);return S(),n}})),t}function B(t=!1,e=!1){return function(n,s,r){if("__v_isReactive"===s)return!t;if("__v_isReadonly"===s)return t;if("__v_isShallow"===s)return e;if("__v_raw"===s&&r===(t?e?mt:ft:e?gt:pt).get(n))return n;const o=(0,i.kJ)(n);if(!t&&o&&(0,i.RI)(L,s))return Reflect.get(L,s,r);const a=Reflect.get(n,s,r);if((0,i.yk)(s)?T.has(s):P(s))return a;if(t||A(n,"get",s),e)return a;if(jt(a)){const t=!o||!(0,i.S0)(s);return t?a.value:a}return(0,i.Kn)(a)?t?wt(a):vt(a):a}}const R=z(),$=z(!0);function z(t=!1){return function(e,n,s,r){let o=e[n];if(St(o)&&jt(o)&&!jt(s))return!1;if(!t&&!St(s)&&(At(s)||(s=kt(s),o=kt(o)),!(0,i.kJ)(e)&&jt(o)&&!jt(s)))return o.value=s,!0;const a=(0,i.kJ)(e)&&(0,i.S0)(n)?Number(n)t,W=t=>Reflect.getPrototypeOf(t);function X(t,e,n=!1,i=!1){t=t["__v_raw"];const s=kt(t),r=kt(e);e!==r&&!n&&A(s,"get",e),!n&&A(s,"get",r);const{has:o}=W(s),a=i?q:n?Tt:Pt;return o.call(s,e)?a(t.get(e)):o.call(s,r)?a(t.get(r)):void(t!==s&&t.get(e))}function Y(t,e=!1){const n=this["__v_raw"],i=kt(n),s=kt(t);return t!==s&&!e&&A(i,"has",t),!e&&A(i,"has",s),t===s?n.has(t):n.has(t)||n.has(s)}function J(t,e=!1){return t=t["__v_raw"],!e&&A(kt(t),"iterate",y),Reflect.get(t,"size",t)}function Z(t){t=kt(t);const e=kt(this),n=W(e),i=n.has.call(e,t);return i||(e.add(t),k(e,"add",t,t)),this}function K(t,e){e=kt(e);const n=kt(this),{has:s,get:r}=W(n);let o=s.call(n,t);o||(t=kt(t),o=s.call(n,t));const a=r.call(n,t);return n.set(t,e),o?(0,i.aU)(e,a)&&k(n,"set",t,e,a):k(n,"add",t,e),this}function Q(t){const e=kt(this),{has:n,get:i}=W(e);let s=n.call(e,t);s||(t=kt(t),s=n.call(e,t));const r=i?i.call(e,t):void 0,o=e.delete(t);return s&&k(e,"delete",t,void 0,r),o}function tt(){const t=kt(this),e=0!==t.size,n=void 0,i=t.clear();return e&&k(t,"clear",void 0,void 0,n),i}function et(t,e){return function(n,i){const s=this,r=s["__v_raw"],o=kt(r),a=e?q:t?Tt:Pt;return!t&&A(o,"iterate",y),r.forEach(((t,e)=>n.call(i,a(t),a(e),s)))}}function nt(t,e,n){return function(...s){const r=this["__v_raw"],o=kt(r),a=(0,i._N)(o),l="entries"===t||t===Symbol.iterator&&a,c="keys"===t&&a,h=r[t](...s),u=n?q:e?Tt:Pt;return!e&&A(o,"iterate",c?b:y),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:l?[u(t[0]),u(t[1])]:u(t),done:e}},[Symbol.iterator](){return this}}}}function it(t){return function(...e){return"delete"!==t&&this}}function st(){const t={get(t){return X(this,t)},get size(){return J(this)},has:Y,add:Z,set:K,delete:Q,clear:tt,forEach:et(!1,!1)},e={get(t){return X(this,t,!1,!0)},get size(){return J(this)},has:Y,add:Z,set:K,delete:Q,clear:tt,forEach:et(!1,!0)},n={get(t){return X(this,t,!0)},get size(){return J(this,!0)},has(t){return Y.call(this,t,!0)},add:it("add"),set:it("set"),delete:it("delete"),clear:it("clear"),forEach:et(!0,!1)},i={get(t){return X(this,t,!0,!0)},get size(){return J(this,!0)},has(t){return Y.call(this,t,!0)},add:it("add"),set:it("set"),delete:it("delete"),clear:it("clear"),forEach:et(!0,!0)},s=["keys","values","entries",Symbol.iterator];return s.forEach((s=>{t[s]=nt(s,!1,!1),n[s]=nt(s,!0,!1),e[s]=nt(s,!1,!0),i[s]=nt(s,!0,!0)})),[t,n,e,i]}const[rt,ot,at,lt]=st();function ct(t,e){const n=e?t?lt:at:t?ot:rt;return(e,s,r)=>"__v_isReactive"===s?!t:"__v_isReadonly"===s?t:"__v_raw"===s?e:Reflect.get((0,i.RI)(n,s)&&s in e?n:e,s,r)}const ht={get:ct(!1,!1)},ut={get:ct(!1,!0)},dt={get:ct(!0,!1)};const pt=new WeakMap,gt=new WeakMap,ft=new WeakMap,mt=new WeakMap;function yt(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function bt(t){return t["__v_skip"]||!Object.isExtensible(t)?0:yt((0,i.W7)(t))}function vt(t){return St(t)?t:xt(t,!1,G,ht,pt)}function Ct(t){return xt(t,!1,U,ut,gt)}function wt(t){return xt(t,!0,H,dt,ft)}function xt(t,e,n,s,r){if(!(0,i.Kn)(t))return t;if(t["__v_raw"]&&(!e||!t["__v_isReactive"]))return t;const o=r.get(t);if(o)return o;const a=bt(t);if(0===a)return t;const l=new Proxy(t,2===a?s:n);return r.set(t,l),l}function Et(t){return St(t)?Et(t["__v_raw"]):!(!t||!t["__v_isReactive"])}function St(t){return!(!t||!t["__v_isReadonly"])}function At(t){return!(!t||!t["__v_isShallow"])}function Mt(t){return Et(t)||St(t)}function kt(t){const e=t&&t["__v_raw"];return e?kt(e):t}function Ot(t){return(0,i.Nj)(t,"__v_skip",!0),t}const Pt=t=>(0,i.Kn)(t)?vt(t):t,Tt=t=>(0,i.Kn)(t)?wt(t):t;function Dt(t){w&&m&&(t=kt(t),M(t.dep||(t.dep=a())))}function Nt(t,e){t=kt(t),t.dep&&O(t.dep)}function jt(t){return!(!t||!0!==t.__v_isRef)}function Lt(t){return Ft(t,!1)}function Ft(t,e){return jt(t)?t:new Bt(t,e)}class Bt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:kt(t),this._value=e?t:Pt(t)}get value(){return Dt(this),this._value}set value(t){t=this.__v_isShallow?t:kt(t),(0,i.aU)(t,this._rawValue)&&(this._rawValue=t,this._value=this.__v_isShallow?t:Pt(t),Nt(this,t))}}function Rt(t){return jt(t)?t.value:t}const $t={get:(t,e,n)=>Rt(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const s=t[e];return jt(s)&&!jt(n)?(s.value=n,!0):Reflect.set(t,e,n,i)}};function zt(t){return Et(t)?t:new Proxy(t,$t)}class It{constructor(t,e,n,i){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new v(t,(()=>{this._dirty||(this._dirty=!0,Nt(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!i,this["__v_isReadonly"]=n}get value(){const t=kt(this);return Dt(t),!t._dirty&&t._cacheable||(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function _t(t,e,n=!1){let s,r;const o=(0,i.mf)(t);o?(s=t,r=i.dG):(s=t.get,r=t.set);const a=new It(s,r,o||!r,n);return a}},252:function(t,e,n){"use strict";n.d(e,{$d:function(){return o},FN:function(){return vn},Fl:function(){return Fn},HY:function(){return De},Ko:function(){return ln},LL:function(){return Oe},P$:function(){return ot},Q6:function(){return dt},U2:function(){return lt},Uk:function(){return tn},Us:function(){return ve},WI:function(){return cn},Wm:function(){return Je},Y3:function(){return x},Y8:function(){return it},YP:function(){return K},_:function(){return Ye},aZ:function(){return pt},bv:function(){return Mt},dG:function(){return on},f3:function(){return J},h:function(){return Bn},iD:function(){return Ve},ic:function(){return Ot},j4:function(){return Ge},kq:function(){return en},mx:function(){return un},nK:function(){return ut},up:function(){return Me},w5:function(){return I},wg:function(){return Re},wy:function(){return ue}});var i=n(262),s=n(577);function r(t,e,n,i){let s;try{s=i?t(...i):t()}catch(r){a(r,e,n)}return s}function o(t,e,n,i){if((0,s.mf)(t)){const o=r(t,e,n,i);return o&&(0,s.tI)(o)&&o.catch((t=>{a(t,e,n)})),o}const l=[];for(let s=0;s>>1,s=N(u[i]);sd&&u.splice(e,1)}function k(t,e,n,i){(0,s.kJ)(t)?n.push(...t):e&&e.includes(t,t.allowRecurse?i+1:i)||n.push(t),A()}function O(t){k(t,g,p,f)}function P(t){k(t,y,m,b)}function T(t,e=null){if(p.length){for(w=e,g=[...new Set(p)],p.length=0,f=0;fN(t)-N(e))),b=0;bnull==t.id?1/0:t.id;function j(t){h=!1,c=!0,T(t),u.sort(((t,e)=>N(t)-N(e)));s.dG;try{for(d=0;dt.trim())):e&&(r=n.map(s.He))}let c;let h=i[c=(0,s.hR)(e)]||i[c=(0,s.hR)((0,s._A)(e))];!h&&a&&(h=i[c=(0,s.hR)((0,s.rs)(e))]),h&&o(h,t,6,r);const u=i[c+"Once"];if(u){if(t.emitted){if(t.emitted[c])return}else t.emitted={};t.emitted[c]=!0,o(u,t,6,r)}}function F(t,e,n=!1){const i=e.emitsCache,r=i.get(t);if(void 0!==r)return r;const o=t.emits;let a={},l=!1;if(!(0,s.mf)(t)){const i=t=>{const n=F(t,e,!0);n&&(l=!0,(0,s.l7)(a,n))};!n&&e.mixins.length&&e.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}return o||l?((0,s.kJ)(o)?o.forEach((t=>a[t]=null)):(0,s.l7)(a,o),i.set(t,a),a):(i.set(t,null),null)}function B(t,e){return!(!t||!(0,s.F7)(e))&&(e=e.slice(2).replace(/Once$/,""),(0,s.RI)(t,e[0].toLowerCase()+e.slice(1))||(0,s.RI)(t,(0,s.rs)(e))||(0,s.RI)(t,e))}let R=null,$=null;function z(t){const e=R;return R=t,$=t&&t.type.__scopeId||null,e}function I(t,e=R,n){if(!e)return t;if(t._n)return t;const i=(...n)=>{i._d&&Ie(-1);const s=z(e),r=t(...n);return z(s),i._d&&Ie(1),r};return i._n=!0,i._c=!0,i._d=!0,i}function _(t){const{type:e,vnode:n,proxy:i,withProxy:r,props:o,propsOptions:[l],slots:c,attrs:h,emit:u,render:d,renderCache:p,data:g,setupState:f,ctx:m,inheritAttrs:y}=t;let b,v;const C=z(t);try{if(4&n.shapeFlag){const t=r||i;b=nn(d.call(t,t,p,o,f,g,m)),v=h}else{const t=e;0,b=nn(t.length>1?t(o,{attrs:h,slots:c,emit:u}):t(o,null)),v=e.props?h:V(h)}}catch(x){Fe.length=0,a(x,t,1),b=Je(je)}let w=b;if(v&&!1!==y){const t=Object.keys(v),{shapeFlag:e}=w;t.length&&7&e&&(l&&t.some(s.tR)&&(v=G(v,l)),w=Qe(w,v))}return n.dirs&&(w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&(w.transition=n.transition),b=w,z(C),b}const V=t=>{let e;for(const n in t)("class"===n||"style"===n||(0,s.F7)(n))&&((e||(e={}))[n]=t[n]);return e},G=(t,e)=>{const n={};for(const i in t)(0,s.tR)(i)&&i.slice(9)in e||(n[i]=t[i]);return n};function H(t,e,n){const{props:i,children:s,component:r}=t,{props:o,children:a,patchFlag:l}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(!(n&&l>=0))return!(!s&&!a||a&&a.$stable)||i!==o&&(i?!o||U(i,o,c):!!o);if(1024&l)return!0;if(16&l)return i?U(i,o,c):!!o;if(8&l){const t=e.dynamicProps;for(let e=0;et.__isSuspense;function X(t,e){e&&e.pendingBranch?(0,s.kJ)(t)?e.effects.push(...t):e.effects.push(t):P(t)}function Y(t,e){if(bn){let n=bn.provides;const i=bn.parent&&bn.parent.provides;i===n&&(n=bn.provides=Object.create(i)),n[t]=e}else 0}function J(t,e,n=!1){const i=bn||R;if(i){const r=null==i.parent?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides;if(r&&t in r)return r[t];if(arguments.length>1)return n&&(0,s.mf)(e)?e.call(i.proxy):e}else 0}const Z={};function K(t,e,n){return Q(t,e,n)}function Q(t,e,{immediate:n,deep:a,flush:l,onTrack:c,onTrigger:h}=s.kT){const u=bn;let d,p,g=!1,f=!1;if((0,i.dq)(t)?(d=()=>t.value,g=(0,i.yT)(t)):(0,i.PG)(t)?(d=()=>t,a=!0):(0,s.kJ)(t)?(f=!0,g=t.some(i.PG),d=()=>t.map((t=>(0,i.dq)(t)?t.value:(0,i.PG)(t)?nt(t):(0,s.mf)(t)?r(t,u,2):void 0))):d=(0,s.mf)(t)?e?()=>r(t,u,2):()=>{if(!u||!u.isUnmounted)return p&&p(),o(t,u,3,[m])}:s.dG,e&&a){const t=d;d=()=>nt(t())}let m=t=>{p=C.onStop=()=>{r(t,u,4)}};if(An)return m=s.dG,e?n&&o(e,u,3,[d(),f?[]:void 0,m]):d(),s.dG;let y=f?[]:Z;const b=()=>{if(C.active)if(e){const t=C.run();(a||g||(f?t.some(((t,e)=>(0,s.aU)(t,y[e]))):(0,s.aU)(t,y)))&&(p&&p(),o(e,u,3,[t,y===Z?void 0:y,m]),y=t)}else C.run()};let v;b.allowRecurse=!!e,v="sync"===l?b:"post"===l?()=>be(b,u&&u.suspense):()=>{!u||u.isMounted?O(b):b()};const C=new i.qq(d,v);return e?n?b():y=C.run():"post"===l?be(C.run.bind(C),u&&u.suspense):C.run(),()=>{C.stop(),u&&u.scope&&(0,s.Od)(u.scope.effects,C)}}function tt(t,e,n){const i=this.proxy,r=(0,s.HD)(t)?t.includes(".")?et(i,t):()=>i[t]:t.bind(i,i);let o;(0,s.mf)(e)?o=e:(o=e.handler,n=e);const a=bn;Cn(this);const l=Q(r,o.bind(i),n);return a?Cn(a):wn(),l}function et(t,e){const n=e.split(".");return()=>{let e=t;for(let t=0;t{nt(t,e)}));else if((0,s.PO)(t))for(const n in t)nt(t[n],e);return t}function it(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Mt((()=>{t.isMounted=!0})),Pt((()=>{t.isUnmounting=!0})),t}const st=[Function,Array],rt={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:st,onEnter:st,onAfterEnter:st,onEnterCancelled:st,onBeforeLeave:st,onLeave:st,onAfterLeave:st,onLeaveCancelled:st,onBeforeAppear:st,onAppear:st,onAfterAppear:st,onAppearCancelled:st},setup(t,{slots:e}){const n=vn(),s=it();let r;return()=>{const o=e.default&&dt(e.default(),!0);if(!o||!o.length)return;let a=o[0];if(o.length>1){let t=!1;for(const e of o)if(e.type!==je){0,a=e,t=!0;break}}const l=(0,i.IU)(t),{mode:c}=l;if(s.isLeaving)return ct(a);const h=ht(a);if(!h)return ct(a);const u=lt(h,l,s,n);ut(h,u);const d=n.subTree,p=d&&ht(d);let g=!1;const{getTransitionKey:f}=h.type;if(f){const t=f();void 0===r?r=t:t!==r&&(r=t,g=!0)}if(p&&p.type!==je&&(!Ue(h,p)||g)){const t=lt(p,l,s,n);if(ut(p,t),"out-in"===c)return s.isLeaving=!0,t.afterLeave=()=>{s.isLeaving=!1,n.update()},ct(a);"in-out"===c&&h.type!==je&&(t.delayLeave=(t,e,n)=>{const i=at(s,p);i[String(p.key)]=p,t._leaveCb=()=>{e(),t._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return a}}},ot=rt;function at(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function lt(t,e,n,i){const{appear:s,mode:r,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:h,onEnterCancelled:u,onBeforeLeave:d,onLeave:p,onAfterLeave:g,onLeaveCancelled:f,onBeforeAppear:m,onAppear:y,onAfterAppear:b,onAppearCancelled:v}=e,C=String(t.key),w=at(n,t),x=(t,e)=>{t&&o(t,i,9,e)},E={mode:r,persisted:a,beforeEnter(e){let i=l;if(!n.isMounted){if(!s)return;i=m||l}e._leaveCb&&e._leaveCb(!0);const r=w[C];r&&Ue(t,r)&&r.el._leaveCb&&r.el._leaveCb(),x(i,[e])},enter(t){let e=c,i=h,r=u;if(!n.isMounted){if(!s)return;e=y||c,i=b||h,r=v||u}let o=!1;const a=t._enterCb=e=>{o||(o=!0,x(e?r:i,[t]),E.delayedLeave&&E.delayedLeave(),t._enterCb=void 0)};e?(e(t,a),e.length<=1&&a()):a()},leave(e,i){const s=String(t.key);if(e._enterCb&&e._enterCb(!0),n.isUnmounting)return i();x(d,[e]);let r=!1;const o=e._leaveCb=n=>{r||(r=!0,i(),x(n?f:g,[e]),e._leaveCb=void 0,w[s]===t&&delete w[s])};w[s]=t,p?(p(e,o),p.length<=1&&o()):o()},clone(t){return lt(t,e,n,i)}};return E}function ct(t){if(ft(t))return t=Qe(t),t.children=null,t}function ht(t){return ft(t)?t.children?t.children[0]:void 0:t}function ut(t,e){6&t.shapeFlag&&t.component?ut(t.component.subTree,e):128&t.shapeFlag?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function dt(t,e=!1,n){let i=[],s=0;for(let r=0;r1)for(let r=0;r!!t.type.__asyncLoader;const ft=t=>t.type.__isKeepAlive;RegExp,RegExp;function mt(t,e){return(0,s.kJ)(t)?t.some((t=>mt(t,e))):(0,s.HD)(t)?t.split(",").includes(e):!!t.test&&t.test(e)}function yt(t,e){vt(t,"a",e)}function bt(t,e){vt(t,"da",e)}function vt(t,e,n=bn){const i=t.__wdc||(t.__wdc=()=>{let e=n;while(e){if(e.isDeactivated)return;e=e.parent}return t()});if(Et(e,i,n),n){let t=n.parent;while(t&&t.parent)ft(t.parent.vnode)&&Ct(i,e,n,t),t=t.parent}}function Ct(t,e,n,i){const r=Et(e,t,i,!0);Tt((()=>{(0,s.Od)(i[e],r)}),n)}function wt(t){let e=t.shapeFlag;256&e&&(e-=256),512&e&&(e-=512),t.shapeFlag=e}function xt(t){return 128&t.shapeFlag?t.ssContent:t}function Et(t,e,n=bn,s=!1){if(n){const r=n[t]||(n[t]=[]),a=e.__weh||(e.__weh=(...s)=>{if(n.isUnmounted)return;(0,i.Jd)(),Cn(n);const r=o(e,n,t,s);return wn(),(0,i.lk)(),r});return s?r.unshift(a):r.push(a),a}}const St=t=>(e,n=bn)=>(!An||"sp"===t)&&Et(t,e,n),At=St("bm"),Mt=St("m"),kt=St("bu"),Ot=St("u"),Pt=St("bum"),Tt=St("um"),Dt=St("sp"),Nt=St("rtg"),jt=St("rtc");function Lt(t,e=bn){Et("ec",t,e)}let Ft=!0;function Bt(t){const e=It(t),n=t.proxy,r=t.ctx;Ft=!1,e.beforeCreate&&$t(e.beforeCreate,t,"bc");const{data:o,computed:a,methods:l,watch:c,provide:h,inject:u,created:d,beforeMount:p,mounted:g,beforeUpdate:f,updated:m,activated:y,deactivated:b,beforeDestroy:v,beforeUnmount:C,destroyed:w,unmounted:x,render:E,renderTracked:S,renderTriggered:A,errorCaptured:M,serverPrefetch:k,expose:O,inheritAttrs:P,components:T,directives:D,filters:N}=e,j=null;if(u&&Rt(u,r,j,t.appContext.config.unwrapInjectedRef),l)for(const i in l){const t=l[i];(0,s.mf)(t)&&(r[i]=t.bind(n))}if(o){0;const e=o.call(n,n);0,(0,s.Kn)(e)&&(t.data=(0,i.qj)(e))}if(Ft=!0,a)for(const i in a){const t=a[i],e=(0,s.mf)(t)?t.bind(n,n):(0,s.mf)(t.get)?t.get.bind(n,n):s.dG;0;const o=!(0,s.mf)(t)&&(0,s.mf)(t.set)?t.set.bind(n):s.dG,l=Fn({get:e,set:o});Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get:()=>l.value,set:t=>l.value=t})}if(c)for(const i in c)zt(c[i],r,n,i);if(h){const t=(0,s.mf)(h)?h.call(n):h;Reflect.ownKeys(t).forEach((e=>{Y(e,t[e])}))}function L(t,e){(0,s.kJ)(e)?e.forEach((e=>t(e.bind(n)))):e&&t(e.bind(n))}if(d&&$t(d,t,"c"),L(At,p),L(Mt,g),L(kt,f),L(Ot,m),L(yt,y),L(bt,b),L(Lt,M),L(jt,S),L(Nt,A),L(Pt,C),L(Tt,x),L(Dt,k),(0,s.kJ)(O))if(O.length){const e=t.exposed||(t.exposed={});O.forEach((t=>{Object.defineProperty(e,t,{get:()=>n[t],set:e=>n[t]=e})}))}else t.exposed||(t.exposed={});E&&t.render===s.dG&&(t.render=E),null!=P&&(t.inheritAttrs=P),T&&(t.components=T),D&&(t.directives=D)}function Rt(t,e,n=s.dG,r=!1){(0,s.kJ)(t)&&(t=Ut(t));for(const o in t){const n=t[o];let a;a=(0,s.Kn)(n)?"default"in n?J(n.from||o,n.default,!0):J(n.from||o):J(n),(0,i.dq)(a)&&r?Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>a.value,set:t=>a.value=t}):e[o]=a}}function $t(t,e,n){o((0,s.kJ)(t)?t.map((t=>t.bind(e.proxy))):t.bind(e.proxy),e,n)}function zt(t,e,n,i){const r=i.includes(".")?et(n,i):()=>n[i];if((0,s.HD)(t)){const n=e[t];(0,s.mf)(n)&&K(r,n)}else if((0,s.mf)(t))K(r,t.bind(n));else if((0,s.Kn)(t))if((0,s.kJ)(t))t.forEach((t=>zt(t,e,n,i)));else{const i=(0,s.mf)(t.handler)?t.handler.bind(n):e[t.handler];(0,s.mf)(i)&&K(r,i,t)}else 0}function It(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=t.appContext,a=r.get(e);let l;return a?l=a:s.length||n||i?(l={},s.length&&s.forEach((t=>_t(l,t,o,!0))),_t(l,e,o)):l=e,r.set(e,l),l}function _t(t,e,n,i=!1){const{mixins:s,extends:r}=e;r&&_t(t,r,n,!0),s&&s.forEach((e=>_t(t,e,n,!0)));for(const o in e)if(i&&"expose"===o);else{const i=Vt[o]||n&&n[o];t[o]=i?i(t[o],e[o]):e[o]}return t}const Vt={data:Gt,props:Wt,emits:Wt,methods:Wt,computed:Wt,beforeCreate:qt,created:qt,beforeMount:qt,mounted:qt,beforeUpdate:qt,updated:qt,beforeDestroy:qt,beforeUnmount:qt,destroyed:qt,unmounted:qt,activated:qt,deactivated:qt,errorCaptured:qt,serverPrefetch:qt,components:Wt,directives:Wt,watch:Xt,provide:Gt,inject:Ht};function Gt(t,e){return e?t?function(){return(0,s.l7)((0,s.mf)(t)?t.call(this,this):t,(0,s.mf)(e)?e.call(this,this):e)}:e:t}function Ht(t,e){return Wt(Ut(t),Ut(e))}function Ut(t){if((0,s.kJ)(t)){const e={};for(let n=0;n0)||16&l){let i;Zt(t,e,o,a)&&(u=!0);for(const r in c)e&&((0,s.RI)(e,r)||(i=(0,s.rs)(r))!==r&&(0,s.RI)(e,i))||(h?!n||void 0===n[r]&&void 0===n[i]||(o[r]=Kt(h,c,r,void 0,t,!0)):delete o[r]);if(a!==c)for(const t in a)e&&(0,s.RI)(e,t)||(delete a[t],u=!0)}else if(8&l){const n=t.vnode.dynamicProps;for(let i=0;i{c=!0;const[n,i]=Qt(t,e,!0);(0,s.l7)(a,n),i&&l.push(...i)};!n&&e.mixins.length&&e.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}if(!o&&!c)return i.set(t,s.Z6),s.Z6;if((0,s.kJ)(o))for(let u=0;u-1,i[1]=n<0||t-1||(0,s.RI)(i,"default"))&&l.push(e)}}}}const h=[a,l];return i.set(t,h),h}function te(t){return"$"!==t[0]}function ee(t){const e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:null===t?"null":""}function ne(t,e){return ee(t)===ee(e)}function ie(t,e){return(0,s.kJ)(e)?e.findIndex((e=>ne(e,t))):(0,s.mf)(e)&&ne(e,t)?0:-1}const se=t=>"_"===t[0]||"$stable"===t,re=t=>(0,s.kJ)(t)?t.map(nn):[nn(t)],oe=(t,e,n)=>{const i=I(((...t)=>re(e(...t))),n);return i._c=!1,i},ae=(t,e,n)=>{const i=t._ctx;for(const r in t){if(se(r))continue;const n=t[r];if((0,s.mf)(n))e[r]=oe(r,n,i);else if(null!=n){0;const t=re(n);e[r]=()=>t}}},le=(t,e)=>{const n=re(e);t.slots.default=()=>n},ce=(t,e)=>{if(32&t.vnode.shapeFlag){const n=e._;n?(t.slots=(0,i.IU)(e),(0,s.Nj)(e,"_",n)):ae(e,t.slots={})}else t.slots={},e&&le(t,e);(0,s.Nj)(t.slots,qe,1)},he=(t,e,n)=>{const{vnode:i,slots:r}=t;let o=!0,a=s.kT;if(32&i.shapeFlag){const t=e._;t?n&&1===t?o=!1:((0,s.l7)(r,e),n||1!==t||delete r._):(o=!e.$stable,ae(e,r)),a=e}else e&&(le(t,e),a={default:1});if(o)for(const s in r)se(s)||s in a||delete r[s]};function ue(t,e){const n=R;if(null===n)return t;const i=Nn(n)||n.proxy,r=t.dirs||(t.dirs=[]);for(let o=0;ome(t,e&&((0,s.kJ)(e)?e[i]:e),n,o,a)));if(gt(o)&&!a)return;const l=4&o.shapeFlag?Nn(o.component)||o.component.proxy:o.el,c=a?null:l,{i:h,r:u}=t;const d=e&&e.r,p=h.refs===s.kT?h.refs={}:h.refs,g=h.setupState;if(null!=d&&d!==u&&((0,s.HD)(d)?(p[d]=null,(0,s.RI)(g,d)&&(g[d]=null)):(0,i.dq)(d)&&(d.value=null)),(0,s.mf)(u))r(u,h,12,[c,p]);else{const e=(0,s.HD)(u),r=(0,i.dq)(u);if(e||r){const r=()=>{if(t.f){const n=e?p[u]:u.value;a?(0,s.kJ)(n)&&(0,s.Od)(n,l):(0,s.kJ)(n)?n.includes(l)||n.push(l):e?(p[u]=[l],(0,s.RI)(g,u)&&(g[u]=p[u])):(u.value=[l],t.k&&(p[t.k]=u.value))}else e?(p[u]=c,(0,s.RI)(g,u)&&(g[u]=c)):(0,i.dq)(u)&&(u.value=c,t.k&&(p[t.k]=c))};c?(r.id=-1,be(r,n)):r()}else 0}}function ye(){}const be=X;function ve(t){return Ce(t)}function Ce(t,e){ye();const n=(0,s.E9)();n.__VUE__=!0;const{insert:r,remove:o,patchProp:a,createElement:l,createText:c,createComment:h,setText:u,setElementText:d,parentNode:p,nextSibling:g,setScopeId:f=s.dG,cloneNode:m,insertStaticContent:y}=t,b=(t,e,n,i=null,s=null,r=null,o=!1,a=null,l=!!e.dynamicChildren)=>{if(t===e)return;t&&!Ue(t,e)&&(i=Q(t),X(t,s,r,!0),t=null),-2===e.patchFlag&&(l=!1,e.dynamicChildren=null);const{type:c,ref:h,shapeFlag:u}=e;switch(c){case Ne:v(t,e,n,i);break;case je:C(t,e,n,i);break;case Le:null==t&&w(e,n,i,o);break;case De:F(t,e,n,i,s,r,o,a,l);break;default:1&u?A(t,e,n,i,s,r,o,a,l):6&u?B(t,e,n,i,s,r,o,a,l):(64&u||128&u)&&c.process(t,e,n,i,s,r,o,a,l,et)}null!=h&&s&&me(h,t&&t.ref,r,e||t,!e)},v=(t,e,n,i)=>{if(null==t)r(e.el=c(e.children),n,i);else{const n=e.el=t.el;e.children!==t.children&&u(n,e.children)}},C=(t,e,n,i)=>{null==t?r(e.el=h(e.children||""),n,i):e.el=t.el},w=(t,e,n,i)=>{[t.el,t.anchor]=y(t.children,e,n,i,t.el,t.anchor)},x=({el:t,anchor:e},n,i)=>{let s;while(t&&t!==e)s=g(t),r(t,n,i),t=s;r(e,n,i)},E=({el:t,anchor:e})=>{let n;while(t&&t!==e)n=g(t),o(t),t=n;o(e)},A=(t,e,n,i,s,r,o,a,l)=>{o=o||"svg"===e.type,null==t?k(e,n,i,s,r,o,a,l):N(t,e,s,r,o,a,l)},k=(t,e,n,i,o,c,h,u)=>{let p,g;const{type:f,props:y,shapeFlag:b,transition:v,patchFlag:C,dirs:w}=t;if(t.el&&void 0!==m&&-1===C)p=t.el=m(t.el);else{if(p=t.el=l(t.type,c,y&&y.is,y),8&b?d(p,t.children):16&b&&P(t.children,p,null,i,o,c&&"foreignObject"!==f,h,u),w&&de(t,null,i,"created"),y){for(const e in y)"value"===e||(0,s.Gg)(e)||a(p,e,null,y[e],c,t.children,i,o,K);"value"in y&&a(p,"value",null,y.value),(g=y.onVnodeBeforeMount)&&an(g,i,t)}O(p,t,t.scopeId,h,i)}w&&de(t,null,i,"beforeMount");const x=(!o||o&&!o.pendingBranch)&&v&&!v.persisted;x&&v.beforeEnter(p),r(p,e,n),((g=y&&y.onVnodeMounted)||x||w)&&be((()=>{g&&an(g,i,t),x&&v.enter(p),w&&de(t,null,i,"mounted")}),o)},O=(t,e,n,i,s)=>{if(n&&f(t,n),i)for(let r=0;r{for(let c=l;c{const c=e.el=t.el;let{patchFlag:h,dynamicChildren:u,dirs:p}=e;h|=16&t.patchFlag;const g=t.props||s.kT,f=e.props||s.kT;let m;n&&we(n,!1),(m=f.onVnodeBeforeUpdate)&&an(m,n,e,t),p&&de(e,t,n,"beforeUpdate"),n&&we(n,!0);const y=r&&"foreignObject"!==e.type;if(u?j(t.dynamicChildren,u,c,n,i,y,o):l||V(t,e,c,null,n,i,y,o,!1),h>0){if(16&h)L(c,e,g,f,n,i,r);else if(2&h&&g.class!==f.class&&a(c,"class",null,f.class,r),4&h&&a(c,"style",g.style,f.style,r),8&h){const s=e.dynamicProps;for(let e=0;e{m&&an(m,n,e,t),p&&de(e,t,n,"updated")}),i)},j=(t,e,n,i,s,r,o)=>{for(let a=0;a{if(n!==i){for(const c in i){if((0,s.Gg)(c))continue;const h=i[c],u=n[c];h!==u&&"value"!==c&&a(t,c,u,h,l,e.children,r,o,K)}if(n!==s.kT)for(const c in n)(0,s.Gg)(c)||c in i||a(t,c,n[c],null,l,e.children,r,o,K);"value"in i&&a(t,"value",n.value,i.value)}},F=(t,e,n,i,s,o,a,l,h)=>{const u=e.el=t?t.el:c(""),d=e.anchor=t?t.anchor:c("");let{patchFlag:p,dynamicChildren:g,slotScopeIds:f}=e;f&&(l=l?l.concat(f):f),null==t?(r(u,n,i),r(d,n,i),P(e.children,n,d,s,o,a,l,h)):p>0&&64&p&&g&&t.dynamicChildren?(j(t.dynamicChildren,g,n,s,o,a,l),(null!=e.key||s&&e===s.subTree)&&xe(t,e,!0)):V(t,e,n,d,s,o,a,l,h)},B=(t,e,n,i,s,r,o,a,l)=>{e.slotScopeIds=a,null==t?512&e.shapeFlag?s.ctx.activate(e,n,i,o,l):R(e,n,i,s,r,o,l):$(t,e,l)},R=(t,e,n,i,s,r,o)=>{const a=t.component=yn(t,i,s);if(ft(t)&&(a.ctx.renderer=et),Mn(a),a.asyncDep){if(s&&s.registerDep(a,z),!t.el){const t=a.subTree=Je(je);C(null,t,e,n)}}else z(a,t,e,n,s,r,o)},$=(t,e,n)=>{const i=e.component=t.component;if(H(t,e,n)){if(i.asyncDep&&!i.asyncResolved)return void I(i,e,n);i.next=e,M(i.update),i.update()}else e.component=t.component,e.el=t.el,i.vnode=e},z=(t,e,n,r,o,a,l)=>{const c=()=>{if(t.isMounted){let e,{next:n,bu:i,u:r,parent:c,vnode:h}=t,u=n;0,we(t,!1),n?(n.el=h.el,I(t,n,l)):n=h,i&&(0,s.ir)(i),(e=n.props&&n.props.onVnodeBeforeUpdate)&&an(e,c,n,h),we(t,!0);const d=_(t);0;const g=t.subTree;t.subTree=d,b(g,d,p(g.el),Q(g),t,o,a),n.el=d.el,null===u&&q(t,d.el),r&&be(r,o),(e=n.props&&n.props.onVnodeUpdated)&&be((()=>an(e,c,n,h)),o)}else{let i;const{el:l,props:c}=e,{bm:h,m:u,parent:d}=t,p=gt(e);if(we(t,!1),h&&(0,s.ir)(h),!p&&(i=c&&c.onVnodeBeforeMount)&&an(i,d,e),we(t,!0),l&&it){const n=()=>{t.subTree=_(t),it(l,t.subTree,t,o,null)};p?e.type.__asyncLoader().then((()=>!t.isUnmounted&&n())):n()}else{0;const i=t.subTree=_(t);0,b(null,i,n,r,t,o,a),e.el=i.el}if(u&&be(u,o),!p&&(i=c&&c.onVnodeMounted)){const t=e;be((()=>an(i,d,t)),o)}256&e.shapeFlag&&t.a&&be(t.a,o),t.isMounted=!0,e=n=r=null}},h=t.effect=new i.qq(c,(()=>S(t.update)),t.scope),u=t.update=h.run.bind(h);u.id=t.uid,we(t,!0),u()},I=(t,e,n)=>{e.component=t;const s=t.vnode.props;t.vnode=e,t.next=null,Jt(t,e.props,s,n),he(t,e.children,n),(0,i.Jd)(),T(void 0,t.update),(0,i.lk)()},V=(t,e,n,i,s,r,o,a,l=!1)=>{const c=t&&t.children,h=t?t.shapeFlag:0,u=e.children,{patchFlag:p,shapeFlag:g}=e;if(p>0){if(128&p)return void U(c,u,n,i,s,r,o,a,l);if(256&p)return void G(c,u,n,i,s,r,o,a,l)}8&g?(16&h&&K(c,s,r),u!==c&&d(n,u)):16&h?16&g?U(c,u,n,i,s,r,o,a,l):K(c,s,r,!0):(8&h&&d(n,""),16&g&&P(u,n,i,s,r,o,a,l))},G=(t,e,n,i,r,o,a,l,c)=>{t=t||s.Z6,e=e||s.Z6;const h=t.length,u=e.length,d=Math.min(h,u);let p;for(p=0;pu?K(t,r,o,!0,!1,d):P(e,n,i,r,o,a,l,c,d)},U=(t,e,n,i,r,o,a,l,c)=>{let h=0;const u=e.length;let d=t.length-1,p=u-1;while(h<=d&&h<=p){const i=t[h],s=e[h]=c?sn(e[h]):nn(e[h]);if(!Ue(i,s))break;b(i,s,n,null,r,o,a,l,c),h++}while(h<=d&&h<=p){const i=t[d],s=e[p]=c?sn(e[p]):nn(e[p]);if(!Ue(i,s))break;b(i,s,n,null,r,o,a,l,c),d--,p--}if(h>d){if(h<=p){const t=p+1,s=tp)while(h<=d)X(t[h],r,o,!0),h++;else{const g=h,f=h,m=new Map;for(h=f;h<=p;h++){const t=e[h]=c?sn(e[h]):nn(e[h]);null!=t.key&&m.set(t.key,h)}let y,v=0;const C=p-f+1;let w=!1,x=0;const E=new Array(C);for(h=0;h=C){X(i,r,o,!0);continue}let s;if(null!=i.key)s=m.get(i.key);else for(y=f;y<=p;y++)if(0===E[y-f]&&Ue(i,e[y])){s=y;break}void 0===s?X(i,r,o,!0):(E[s-f]=h+1,s>=x?x=s:w=!0,b(i,e[s],n,null,r,o,a,l,c),v++)}const S=w?Ee(E):s.Z6;for(y=S.length-1,h=C-1;h>=0;h--){const t=f+h,s=e[t],d=t+1{const{el:o,type:a,transition:l,children:c,shapeFlag:h}=t;if(6&h)return void W(t.component.subTree,e,n,i);if(128&h)return void t.suspense.move(e,n,i);if(64&h)return void a.move(t,e,n,et);if(a===De){r(o,e,n);for(let t=0;tl.enter(o)),s);else{const{leave:t,delayLeave:i,afterLeave:s}=l,a=()=>r(o,e,n),c=()=>{t(o,(()=>{a(),s&&s()}))};i?i(o,a,c):c()}else r(o,e,n)},X=(t,e,n,i=!1,s=!1)=>{const{type:r,props:o,ref:a,children:l,dynamicChildren:c,shapeFlag:h,patchFlag:u,dirs:d}=t;if(null!=a&&me(a,null,n,t,!0),256&h)return void e.ctx.deactivate(t);const p=1&h&&d,g=!gt(t);let f;if(g&&(f=o&&o.onVnodeBeforeUnmount)&&an(f,e,t),6&h)Z(t.component,n,i);else{if(128&h)return void t.suspense.unmount(n,i);p&&de(t,null,e,"beforeUnmount"),64&h?t.type.remove(t,e,n,s,et,i):c&&(r!==De||u>0&&64&u)?K(c,e,n,!1,!0):(r===De&&384&u||!s&&16&h)&&K(l,e,n),i&&Y(t)}(g&&(f=o&&o.onVnodeUnmounted)||p)&&be((()=>{f&&an(f,e,t),p&&de(t,null,e,"unmounted")}),n)},Y=t=>{const{type:e,el:n,anchor:i,transition:s}=t;if(e===De)return void J(n,i);if(e===Le)return void E(t);const r=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&t.shapeFlag&&s&&!s.persisted){const{leave:e,delayLeave:i}=s,o=()=>e(n,r);i?i(t.el,r,o):o()}else r()},J=(t,e)=>{let n;while(t!==e)n=g(t),o(t),t=n;o(e)},Z=(t,e,n)=>{const{bum:i,scope:r,update:o,subTree:a,um:l}=t;i&&(0,s.ir)(i),r.stop(),o&&(o.active=!1,X(a,t,e,n)),l&&be(l,e),be((()=>{t.isUnmounted=!0}),e),e&&e.pendingBranch&&!e.isUnmounted&&t.asyncDep&&!t.asyncResolved&&t.suspenseId===e.pendingId&&(e.deps--,0===e.deps&&e.resolve())},K=(t,e,n,i=!1,s=!1,r=0)=>{for(let o=r;o6&t.shapeFlag?Q(t.component.subTree):128&t.shapeFlag?t.suspense.next():g(t.anchor||t.el),tt=(t,e,n)=>{null==t?e._vnode&&X(e._vnode,null,null,!0):b(e._vnode||null,t,e,null,null,null,n),D(),e._vnode=t},et={p:b,um:X,m:W,r:Y,mt:R,mc:P,pc:V,pbc:j,n:Q,o:t};let nt,it;return e&&([nt,it]=e(et)),{render:tt,hydrate:nt,createApp:fe(tt,nt)}}function we({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function xe(t,e,n=!1){const i=t.children,r=e.children;if((0,s.kJ)(i)&&(0,s.kJ)(r))for(let s=0;s>1,t[n[a]]0&&(e[i]=n[r-1]),n[r]=i)}}r=n.length,o=n[r-1];while(r-- >0)n[r]=o,o=e[o];return n}const Se=t=>t.__isTeleport;const Ae="components";function Me(t,e){return Pe(Ae,t,!0,e)||t}const ke=Symbol();function Oe(t){return(0,s.HD)(t)?Pe(Ae,t,!1)||t:t||ke}function Pe(t,e,n=!0,i=!1){const r=R||bn;if(r){const n=r.type;if(t===Ae){const t=jn(n);if(t&&(t===e||t===(0,s._A)(e)||t===(0,s.kC)((0,s._A)(e))))return n}const o=Te(r[t]||n[t],e)||Te(r.appContext[t],e);return!o&&i?n:o}}function Te(t,e){return t&&(t[e]||t[(0,s._A)(e)]||t[(0,s.kC)((0,s._A)(e))])}const De=Symbol(void 0),Ne=Symbol(void 0),je=Symbol(void 0),Le=Symbol(void 0),Fe=[];let Be=null;function Re(t=!1){Fe.push(Be=t?null:[])}function $e(){Fe.pop(),Be=Fe[Fe.length-1]||null}let ze=1;function Ie(t){ze+=t}function _e(t){return t.dynamicChildren=ze>0?Be||s.Z6:null,$e(),ze>0&&Be&&Be.push(t),t}function Ve(t,e,n,i,s,r){return _e(Ye(t,e,n,i,s,r,!0))}function Ge(t,e,n,i,s){return _e(Je(t,e,n,i,s,!0))}function He(t){return!!t&&!0===t.__v_isVNode}function Ue(t,e){return t.type===e.type&&t.key===e.key}const qe="__vInternal",We=({key:t})=>null!=t?t:null,Xe=({ref:t,ref_key:e,ref_for:n})=>null!=t?(0,s.HD)(t)||(0,i.dq)(t)||(0,s.mf)(t)?{i:R,r:t,k:e,f:!!n}:t:null;function Ye(t,e=null,n=null,i=0,r=null,o=(t===De?0:1),a=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&We(e),ref:e&&Xe(e),scopeId:$,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null};return l?(rn(c,n),128&o&&t.normalize(c)):n&&(c.shapeFlag|=(0,s.HD)(n)?8:16),ze>0&&!a&&Be&&(c.patchFlag>0||6&o)&&32!==c.patchFlag&&Be.push(c),c}const Je=Ze;function Ze(t,e=null,n=null,r=0,o=null,a=!1){if(t&&t!==ke||(t=je),He(t)){const i=Qe(t,e,!0);return n&&rn(i,n),i}if(Ln(t)&&(t=t.__vccOpts),e){e=Ke(e);let{class:t,style:n}=e;t&&!(0,s.HD)(t)&&(e.class=(0,s.C_)(t)),(0,s.Kn)(n)&&((0,i.X3)(n)&&!(0,s.kJ)(n)&&(n=(0,s.l7)({},n)),e.style=(0,s.j5)(n))}const l=(0,s.HD)(t)?1:W(t)?128:Se(t)?64:(0,s.Kn)(t)?4:(0,s.mf)(t)?2:0;return Ye(t,e,n,r,o,l,a,!0)}function Ke(t){return t?(0,i.X3)(t)||qe in t?(0,s.l7)({},t):t:null}function Qe(t,e,n=!1){const{props:i,ref:r,patchFlag:o,children:a}=t,l=e?on(i||{},e):i,c={__v_isVNode:!0,__v_skip:!0,type:t.type,props:l,key:l&&We(l),ref:e&&e.ref?n&&r?(0,s.kJ)(r)?r.concat(Xe(e)):[r,Xe(e)]:Xe(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==De?-1===o?16:16|o:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Qe(t.ssContent),ssFallback:t.ssFallback&&Qe(t.ssFallback),el:t.el,anchor:t.anchor};return c}function tn(t=" ",e=0){return Je(Ne,null,t,e)}function en(t="",e=!1){return e?(Re(),Ge(je,null,t)):Je(je,null,t)}function nn(t){return null==t||"boolean"===typeof t?Je(je):(0,s.kJ)(t)?Je(De,null,t.slice()):"object"===typeof t?sn(t):Je(Ne,null,String(t))}function sn(t){return null===t.el||t.memo?t:Qe(t)}function rn(t,e){let n=0;const{shapeFlag:i}=t;if(null==e)e=null;else if((0,s.kJ)(e))n=16;else if("object"===typeof e){if(65&i){const n=e.default;return void(n&&(n._c&&(n._d=!1),rn(t,n()),n._c&&(n._d=!0)))}{n=32;const i=e._;i||qe in e?3===i&&R&&(1===R.slots._?e._=1:(e._=2,t.patchFlag|=1024)):e._ctx=R}}else(0,s.mf)(e)?(e={default:e,_ctx:R},n=32):(e=String(e),64&i?(n=16,e=[tn(e)]):n=8);t.children=e,t.shapeFlag|=n}function on(...t){const e={};for(let n=0;ne(t,n,void 0,o&&o[n])));else{const n=Object.keys(t);r=new Array(n.length);for(let i=0,s=n.length;i!He(t)||t.type!==je&&!(t.type===De&&!hn(t.children))))?t:null}function un(t){const e={};for(const n in t)e[(0,s.hR)(n)]=t[n];return e}const dn=t=>t?xn(t)?Nn(t)||t.proxy:dn(t.parent):null,pn=(0,s.l7)(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>dn(t.parent),$root:t=>dn(t.root),$emit:t=>t.emit,$options:t=>It(t),$forceUpdate:t=>()=>S(t.update),$nextTick:t=>x.bind(t.proxy),$watch:t=>tt.bind(t)}),gn={get({_:t},e){const{ctx:n,setupState:r,data:o,props:a,accessCache:l,type:c,appContext:h}=t;let u;if("$"!==e[0]){const i=l[e];if(void 0!==i)switch(i){case 1:return r[e];case 2:return o[e];case 4:return n[e];case 3:return a[e]}else{if(r!==s.kT&&(0,s.RI)(r,e))return l[e]=1,r[e];if(o!==s.kT&&(0,s.RI)(o,e))return l[e]=2,o[e];if((u=t.propsOptions[0])&&(0,s.RI)(u,e))return l[e]=3,a[e];if(n!==s.kT&&(0,s.RI)(n,e))return l[e]=4,n[e];Ft&&(l[e]=0)}}const d=pn[e];let p,g;return d?("$attrs"===e&&(0,i.j)(t,"get",e),d(t)):(p=c.__cssModules)&&(p=p[e])?p:n!==s.kT&&(0,s.RI)(n,e)?(l[e]=4,n[e]):(g=h.config.globalProperties,(0,s.RI)(g,e)?g[e]:void 0)},set({_:t},e,n){const{data:i,setupState:r,ctx:o}=t;return r!==s.kT&&(0,s.RI)(r,e)?(r[e]=n,!0):i!==s.kT&&(0,s.RI)(i,e)?(i[e]=n,!0):!(0,s.RI)(t.props,e)&&(("$"!==e[0]||!(e.slice(1)in t))&&(o[e]=n,!0))},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:r,propsOptions:o}},a){let l;return!!n[a]||t!==s.kT&&(0,s.RI)(t,a)||e!==s.kT&&(0,s.RI)(e,a)||(l=o[0])&&(0,s.RI)(l,a)||(0,s.RI)(i,a)||(0,s.RI)(pn,a)||(0,s.RI)(r.config.globalProperties,a)},defineProperty(t,e,n){return null!=n.get?t._.accessCache[e]=0:(0,s.RI)(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};const fn=pe();let mn=0;function yn(t,e,n){const r=t.type,o=(e?e.appContext:t.appContext)||fn,a={uid:mn++,vnode:t,type:r,parent:e,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new i.Bj(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Qt(r,o),emitsOptions:F(r,o),emit:null,emitted:null,propsDefaults:s.kT,inheritAttrs:r.inheritAttrs,ctx:s.kT,data:s.kT,props:s.kT,attrs:s.kT,slots:s.kT,refs:s.kT,setupState:s.kT,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=e?e.root:a,a.emit=L.bind(null,a),t.ce&&t.ce(a),a}let bn=null;const vn=()=>bn||R,Cn=t=>{bn=t,t.scope.on()},wn=()=>{bn&&bn.scope.off(),bn=null};function xn(t){return 4&t.vnode.shapeFlag}let En,Sn,An=!1;function Mn(t,e=!1){An=e;const{props:n,children:i}=t.vnode,s=xn(t);Yt(t,n,s,e),ce(t,i);const r=s?kn(t,e):void 0;return An=!1,r}function kn(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=(0,i.Xl)(new Proxy(t.ctx,gn));const{setup:o}=n;if(o){const n=t.setupContext=o.length>1?Dn(t):null;Cn(t),(0,i.Jd)();const l=r(o,t,0,[t.props,n]);if((0,i.lk)(),wn(),(0,s.tI)(l)){if(l.then(wn,wn),e)return l.then((n=>{On(t,n,e)})).catch((e=>{a(e,t,0)}));t.asyncDep=l}else On(t,l,e)}else Pn(t,e)}function On(t,e,n){(0,s.mf)(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:(0,s.Kn)(e)&&(t.setupState=(0,i.WL)(e)),Pn(t,n)}function Pn(t,e,n){const r=t.type;if(!t.render){if(!e&&En&&!r.render){const e=r.template;if(e){0;const{isCustomElement:n,compilerOptions:i}=t.appContext.config,{delimiters:o,compilerOptions:a}=r,l=(0,s.l7)((0,s.l7)({isCustomElement:n,delimiters:o},i),a);r.render=En(e,l)}}t.render=r.render||s.dG,Sn&&Sn(t)}Cn(t),(0,i.Jd)(),Bt(t),(0,i.lk)(),wn()}function Tn(t){return new Proxy(t.attrs,{get(e,n){return(0,i.j)(t,"get","$attrs"),e[n]}})}function Dn(t){const e=e=>{t.exposed=e||{}};let n;return{get attrs(){return n||(n=Tn(t))},slots:t.slots,emit:t.emit,expose:e}}function Nn(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy((0,i.WL)((0,i.Xl)(t.exposed)),{get(e,n){return n in e?e[n]:n in pn?pn[n](t):void 0}}))}function jn(t){return(0,s.mf)(t)&&t.displayName||t.name}function Ln(t){return(0,s.mf)(t)&&"__vccOpts"in t}const Fn=(t,e)=>(0,i.Fl)(t,e,An);function Bn(t,e,n){const i=arguments.length;return 2===i?(0,s.Kn)(e)&&!(0,s.kJ)(e)?He(e)?Je(t,null,[e]):Je(t,e):Je(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):3===i&&He(n)&&(n=[n]),Je(t,e,n))}Symbol("");const Rn="3.2.33"},963:function(t,e,n){"use strict";n.d(e,{W3:function(){return st},e8:function(){return gt},iM:function(){return Ct},nr:function(){return pt},ri:function(){return St}});var i=n(577),s=n(252),r=n(262);const o="http://www.w3.org/2000/svg",a="undefined"!==typeof document?document:null,l=a&&a.createElement("template"),c={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const s=e?a.createElementNS(o,t):a.createElement(t,n?{is:n}:void 0);return"select"===t&&i&&null!=i.multiple&&s.setAttribute("multiple",i.multiple),s},createText:t=>a.createTextNode(t),createComment:t=>a.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>a.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},cloneNode(t){const e=t.cloneNode(!0);return"_value"in t&&(e._value=t._value),e},insertStaticContent(t,e,n,i,s,r){const o=n?n.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling)){while(1)if(e.insertBefore(s.cloneNode(!0),n),s===r||!(s=s.nextSibling))break}else{l.innerHTML=i?`${t}`:t;const s=l.content;if(i){const t=s.firstChild;while(t.firstChild)s.appendChild(t.firstChild);s.removeChild(t)}e.insertBefore(s,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}};function h(t,e,n){const i=t._vtc;i&&(e=(e?[e,...i]:[...i]).join(" ")),null==e?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}function u(t,e,n){const s=t.style,r=(0,i.HD)(n);if(n&&!r){for(const t in n)p(s,t,n[t]);if(e&&!(0,i.HD)(e))for(const t in e)null==n[t]&&p(s,t,"")}else{const i=s.display;r?e!==n&&(s.cssText=n):e&&t.removeAttribute("style"),"_vod"in t&&(s.display=i)}}const d=/\s*!important$/;function p(t,e,n){if((0,i.kJ)(n))n.forEach((n=>p(t,e,n)));else if(null==n&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const s=m(t,e);d.test(n)?t.setProperty((0,i.rs)(s),n.replace(d,""),"important"):t[s]=n}}const g=["Webkit","Moz","ms"],f={};function m(t,e){const n=f[e];if(n)return n;let s=(0,i._A)(e);if("filter"!==s&&s in t)return f[e]=s;s=(0,i.kC)(s);for(let i=0;i{let t=Date.now,e=!1;if("undefined"!==typeof window){Date.now()>document.createEvent("Event").timeStamp&&(t=()=>performance.now());const n=navigator.userAgent.match(/firefox\/(\d+)/i);e=!!(n&&Number(n[1])<=53)}return[t,e]})();let x=0;const E=Promise.resolve(),S=()=>{x=0},A=()=>x||(E.then(S),x=C());function M(t,e,n,i){t.addEventListener(e,n,i)}function k(t,e,n,i){t.removeEventListener(e,n,i)}function O(t,e,n,i,s=null){const r=t._vei||(t._vei={}),o=r[e];if(i&&o)o.value=i;else{const[n,a]=T(e);if(i){const o=r[e]=D(i,s);M(t,n,o,a)}else o&&(k(t,n,o,a),r[e]=void 0)}}const P=/(?:Once|Passive|Capture)$/;function T(t){let e;if(P.test(t)){let n;e={};while(n=t.match(P))t=t.slice(0,t.length-n[0].length),e[n[0].toLowerCase()]=!0}return[(0,i.rs)(t.slice(2)),e]}function D(t,e){const n=t=>{const i=t.timeStamp||C();(w||i>=n.attached-1)&&(0,s.$d)(N(t,n.value),e,5,[t])};return n.value=t,n.attached=A(),n}function N(t,e){if((0,i.kJ)(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map((t=>e=>!e._stopped&&t&&t(e)))}return e}const j=/^on[a-z]/,L=(t,e,n,s,r=!1,o,a,l,c)=>{"class"===e?h(t,s,r):"style"===e?u(t,n,s):(0,i.F7)(e)?(0,i.tR)(e)||O(t,e,n,s,a):("."===e[0]?(e=e.slice(1),1):"^"===e[0]?(e=e.slice(1),0):F(t,e,s,r))?v(t,e,s,o,a,l,c):("true-value"===e?t._trueValue=s:"false-value"===e&&(t._falseValue=s),b(t,e,s,r))};function F(t,e,n,s){return s?"innerHTML"===e||"textContent"===e||!!(e in t&&j.test(e)&&(0,i.mf)(n)):"spellcheck"!==e&&"draggable"!==e&&"translate"!==e&&("form"!==e&&(("list"!==e||"INPUT"!==t.tagName)&&(("type"!==e||"TEXTAREA"!==t.tagName)&&((!j.test(e)||!(0,i.HD)(n))&&e in t))))}"undefined"!==typeof HTMLElement&&HTMLElement;const B="transition",R="animation",$=(t,{slots:e})=>(0,s.h)(s.P$,G(t),e);$.displayName="Transition";const z={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},I=$.props=(0,i.l7)({},s.P$.props,z),_=(t,e=[])=>{(0,i.kJ)(t)?t.forEach((t=>t(...e))):t&&t(...e)},V=t=>!!t&&((0,i.kJ)(t)?t.some((t=>t.length>1)):t.length>1);function G(t){const e={};for(const i in t)i in z||(e[i]=t[i]);if(!1===t.css)return e;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:h=a,appearToClass:u=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=t,f=H(r),m=f&&f[0],y=f&&f[1],{onBeforeEnter:b,onEnter:v,onEnterCancelled:C,onLeave:w,onLeaveCancelled:x,onBeforeAppear:E=b,onAppear:S=v,onAppearCancelled:A=C}=e,M=(t,e,n)=>{W(t,e?u:l),W(t,e?h:a),n&&n()},k=(t,e)=>{W(t,g),W(t,p),e&&e()},O=t=>(e,n)=>{const i=t?S:v,r=()=>M(e,t,n);_(i,[e,r]),X((()=>{W(e,t?c:o),q(e,t?u:l),V(i)||J(e,s,m,r)}))};return(0,i.l7)(e,{onBeforeEnter(t){_(b,[t]),q(t,o),q(t,a)},onBeforeAppear(t){_(E,[t]),q(t,c),q(t,h)},onEnter:O(!1),onAppear:O(!0),onLeave(t,e){const n=()=>k(t,e);q(t,d),tt(),q(t,p),X((()=>{W(t,d),q(t,g),V(w)||J(t,s,y,n)})),_(w,[t,n])},onEnterCancelled(t){M(t,!1),_(C,[t])},onAppearCancelled(t){M(t,!0),_(A,[t])},onLeaveCancelled(t){k(t),_(x,[t])}})}function H(t){if(null==t)return null;if((0,i.Kn)(t))return[U(t.enter),U(t.leave)];{const e=U(t);return[e,e]}}function U(t){const e=(0,i.He)(t);return e}function q(t,e){e.split(/\s+/).forEach((e=>e&&t.classList.add(e))),(t._vtc||(t._vtc=new Set)).add(e)}function W(t,e){e.split(/\s+/).forEach((e=>e&&t.classList.remove(e)));const{_vtc:n}=t;n&&(n.delete(e),n.size||(t._vtc=void 0))}function X(t){requestAnimationFrame((()=>{requestAnimationFrame(t)}))}let Y=0;function J(t,e,n,i){const s=t._endId=++Y,r=()=>{s===t._endId&&i()};if(n)return setTimeout(r,n);const{type:o,timeout:a,propCount:l}=Z(t,e);if(!o)return i();const c=o+"end";let h=0;const u=()=>{t.removeEventListener(c,d),r()},d=e=>{e.target===t&&++h>=l&&u()};setTimeout((()=>{h(n[t]||"").split(", "),s=i(B+"Delay"),r=i(B+"Duration"),o=K(s,r),a=i(R+"Delay"),l=i(R+"Duration"),c=K(a,l);let h=null,u=0,d=0;e===B?o>0&&(h=B,u=o,d=r.length):e===R?c>0&&(h=R,u=c,d=l.length):(u=Math.max(o,c),h=u>0?o>c?B:R:null,d=h?h===B?r.length:l.length:0);const p=h===B&&/\b(transform|all)(,|$)/.test(n[B+"Property"]);return{type:h,timeout:u,propCount:d,hasTransform:p}}function K(t,e){while(t.lengthQ(e)+Q(t[n]))))}function Q(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function tt(){return document.body.offsetHeight}const et=new WeakMap,nt=new WeakMap,it={name:"TransitionGroup",props:(0,i.l7)({},I,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=(0,s.FN)(),i=(0,s.Y8)();let o,a;return(0,s.ic)((()=>{if(!o.length)return;const e=t.moveClass||`${t.name||"v"}-move`;if(!lt(o[0].el,n.vnode.el,e))return;o.forEach(rt),o.forEach(ot);const i=o.filter(at);tt(),i.forEach((t=>{const n=t.el,i=n.style;q(n,e),i.transform=i.webkitTransform=i.transitionDuration="";const s=n._moveCb=t=>{t&&t.target!==n||t&&!/transform$/.test(t.propertyName)||(n.removeEventListener("transitionend",s),n._moveCb=null,W(n,e))};n.addEventListener("transitionend",s)}))})),()=>{const l=(0,r.IU)(t),c=G(l);let h=l.tag||s.HY;o=a,a=e.default?(0,s.Q6)(e.default()):[];for(let t=0;t{t.split(/\s+/).forEach((t=>t&&i.classList.remove(t)))})),n.split(/\s+/).forEach((t=>t&&i.classList.add(t))),i.style.display="none";const s=1===e.nodeType?e:e.parentNode;s.appendChild(i);const{hasTransform:r}=Z(i);return s.removeChild(i),r}const ct=t=>{const e=t.props["onUpdate:modelValue"];return(0,i.kJ)(e)?t=>(0,i.ir)(e,t):e};function ht(t){t.target.composing=!0}function ut(t){const e=t.target;e.composing&&(e.composing=!1,dt(e,"input"))}function dt(t,e){const n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}const pt={created(t,{modifiers:{lazy:e,trim:n,number:s}},r){t._assign=ct(r);const o=s||r.props&&"number"===r.props.type;M(t,e?"change":"input",(e=>{if(e.target.composing)return;let s=t.value;n?s=s.trim():o&&(s=(0,i.He)(s)),t._assign(s)})),n&&M(t,"change",(()=>{t.value=t.value.trim()})),e||(M(t,"compositionstart",ht),M(t,"compositionend",ut),M(t,"change",ut))},mounted(t,{value:e}){t.value=null==e?"":e},beforeUpdate(t,{value:e,modifiers:{lazy:n,trim:s,number:r}},o){if(t._assign=ct(o),t.composing)return;if(document.activeElement===t){if(n)return;if(s&&t.value.trim()===e)return;if((r||"number"===t.type)&&(0,i.He)(t.value)===e)return}const a=null==e?"":e;t.value!==a&&(t.value=a)}},gt={deep:!0,created(t,e,n){t._assign=ct(n),M(t,"change",(()=>{const e=t._modelValue,n=mt(t),s=t.checked,r=t._assign;if((0,i.kJ)(e)){const t=(0,i.hq)(e,n),o=-1!==t;if(s&&!o)r(e.concat(n));else if(!s&&o){const n=[...e];n.splice(t,1),r(n)}}else if((0,i.DM)(e)){const t=new Set(e);s?t.add(n):t.delete(n),r(t)}else r(yt(t,s))}))},mounted:ft,beforeUpdate(t,e,n){t._assign=ct(n),ft(t,e,n)}};function ft(t,{value:e,oldValue:n},s){t._modelValue=e,(0,i.kJ)(e)?t.checked=(0,i.hq)(e,s.props.value)>-1:(0,i.DM)(e)?t.checked=e.has(s.props.value):e!==n&&(t.checked=(0,i.WV)(e,yt(t,!0)))}function mt(t){return"_value"in t?t._value:t.value}function yt(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const bt=["ctrl","shift","alt","meta"],vt={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&0!==t.button,middle:t=>"button"in t&&1!==t.button,right:t=>"button"in t&&2!==t.button,exact:(t,e)=>bt.some((n=>t[`${n}Key`]&&!e.includes(n)))},Ct=(t,e)=>(n,...i)=>{for(let t=0;t{const e=Et().createApp(...t);const{mount:n}=e;return e.mount=t=>{const s=At(t);if(!s)return;const r=e._component;(0,i.mf)(r)||r.render||r.template||(r.template=s.innerHTML),s.innerHTML="";const o=n(s,!1,s instanceof SVGElement);return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e};function At(t){if((0,i.HD)(t)){const e=document.querySelector(t);return e}return t}},577:function(t,e,n){"use strict";function i(t,e){const n=Object.create(null),i=t.split(",");for(let s=0;s!!n[t.toLowerCase()]:t=>!!n[t]}n.d(e,{C_:function(){return p},DM:function(){return N},E9:function(){return it},F7:function(){return S},Gg:function(){return H},HD:function(){return F},He:function(){return et},Kn:function(){return R},NO:function(){return x},Nj:function(){return tt},Od:function(){return k},PO:function(){return V},Pq:function(){return a},RI:function(){return P},S0:function(){return G},W7:function(){return _},WV:function(){return f},Z6:function(){return C},_A:function(){return W},_N:function(){return D},aU:function(){return K},dG:function(){return w},e1:function(){return r},fY:function(){return i},hR:function(){return Z},hq:function(){return m},ir:function(){return Q},j5:function(){return c},kC:function(){return J},kJ:function(){return T},kT:function(){return v},l7:function(){return M},mf:function(){return L},rs:function(){return Y},tI:function(){return $},tR:function(){return A},yA:function(){return l},yk:function(){return B},zw:function(){return y}});const s="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",r=i(s);const o="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",a=i(o);function l(t){return!!t||""===t}function c(t){if(T(t)){const e={};for(let n=0;n{if(t){const n=t.split(u);n.length>1&&(e[n[0].trim()]=n[1].trim())}})),e}function p(t){let e="";if(F(t))e=t;else if(T(t))for(let n=0;nf(t,e)))}const y=t=>F(t)?t:null==t?"":T(t)||R(t)&&(t.toString===z||!L(t.toString))?JSON.stringify(t,b,2):String(t),b=(t,e)=>e&&e.__v_isRef?b(t,e.value):D(e)?{[`Map(${e.size})`]:[...e.entries()].reduce(((t,[e,n])=>(t[`${e} =>`]=n,t)),{})}:N(e)?{[`Set(${e.size})`]:[...e.values()]}:!R(e)||T(e)||V(e)?e:String(e),v={},C=[],w=()=>{},x=()=>!1,E=/^on[^a-z]/,S=t=>E.test(t),A=t=>t.startsWith("onUpdate:"),M=Object.assign,k=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},O=Object.prototype.hasOwnProperty,P=(t,e)=>O.call(t,e),T=Array.isArray,D=t=>"[object Map]"===I(t),N=t=>"[object Set]"===I(t),j=t=>t instanceof Date,L=t=>"function"===typeof t,F=t=>"string"===typeof t,B=t=>"symbol"===typeof t,R=t=>null!==t&&"object"===typeof t,$=t=>R(t)&&L(t.then)&&L(t.catch),z=Object.prototype.toString,I=t=>z.call(t),_=t=>I(t).slice(8,-1),V=t=>"[object Object]"===I(t),G=t=>F(t)&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,H=i(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),U=t=>{const e=Object.create(null);return n=>{const i=e[n];return i||(e[n]=t(n))}},q=/-(\w)/g,W=U((t=>t.replace(q,((t,e)=>e?e.toUpperCase():"")))),X=/\B([A-Z])/g,Y=U((t=>t.replace(X,"-$1").toLowerCase())),J=U((t=>t.charAt(0).toUpperCase()+t.slice(1))),Z=U((t=>t?`on${J(t)}`:"")),K=(t,e)=>!Object.is(t,e),Q=(t,e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},et=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let nt;const it=()=>nt||(nt="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:{})},450:function(t,e,n){var i,s,r; +/*! + * jQuery Mousewheel 3.1.13 + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license + * http://jquery.org/license + */(function(o){s=[n(755)],i=o,r="function"===typeof i?i.apply(e,s):i,void 0===r||(t.exports=r)})((function(t){var e,n,i=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],s="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],r=Array.prototype.slice;if(t.event.fixHooks)for(var o=i.length;o;)t.event.fixHooks[i[--o]]=t.event.mouseHooks;var a=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=s.length;e;)this.addEventListener(s[--e],l,!1);else this.onmousewheel=l;t.data(this,"mousewheel-line-height",a.getLineHeight(this)),t.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=s.length;e;)this.removeEventListener(s[--e],l,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var n=t(e),i=n["offsetParent"in t.fn?"offsetParent":"parent"]();return i.length||(i=t("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function l(i){var s=i||window.event,o=r.call(arguments,1),l=0,u=0,d=0,p=0,g=0,f=0;if(i=t.event.fix(s),i.type="mousewheel","detail"in s&&(d=-1*s.detail),"wheelDelta"in s&&(d=s.wheelDelta),"wheelDeltaY"in s&&(d=s.wheelDeltaY),"wheelDeltaX"in s&&(u=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(u=-1*d,d=0),l=0===d?u:d,"deltaY"in s&&(d=-1*s.deltaY,l=d),"deltaX"in s&&(u=s.deltaX,0===d&&(l=-1*u)),0!==d||0!==u){if(1===s.deltaMode){var m=t.data(this,"mousewheel-line-height");l*=m,d*=m,u*=m}else if(2===s.deltaMode){var y=t.data(this,"mousewheel-page-height");l*=y,d*=y,u*=y}if(p=Math.max(Math.abs(d),Math.abs(u)),(!n||p=1?"floor":"ceil"](l/n),u=Math[u>=1?"floor":"ceil"](u/n),d=Math[d>=1?"floor":"ceil"](d/n),a.settings.normalizeOffset&&this.getBoundingClientRect){var b=this.getBoundingClientRect();g=i.clientX-b.left,f=i.clientY-b.top}return i.deltaX=u,i.deltaY=d,i.deltaFactor=n,i.offsetX=g,i.offsetY=f,i.deltaMode=0,o.unshift(i,l,u,d),e&&clearTimeout(e),e=setTimeout(c,200),(t.event.dispatch||t.event.handle).apply(this,o)}}function c(){n=null}function h(t,e){return a.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120===0}t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}))},755:function(t,e){var n,i; +/*! + * jQuery JavaScript Library v3.6.0 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright OpenJS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2021-03-02T17:08Z + */(function(e,n){"use strict";"object"===typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)})("undefined"!==typeof window?window:this,(function(s,r){"use strict";var o=[],a=Object.getPrototypeOf,l=o.slice,c=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},h=o.push,u=o.indexOf,d={},p=d.toString,g=d.hasOwnProperty,f=g.toString,m=f.call(Object),y={},b=function(t){return"function"===typeof t&&"number"!==typeof t.nodeType&&"function"!==typeof t.item},v=function(t){return null!=t&&t===t.window},C=s.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){n=n||C;var i,s,r=n.createElement("script");if(r.text=t,e)for(i in w)s=e[i]||e.getAttribute&&e.getAttribute(i),s&&r.setAttribute(i,s);n.head.appendChild(r).parentNode.removeChild(r)}function E(t){return null==t?t+"":"object"===typeof t||"function"===typeof t?d[p.call(t)]||"object":typeof t}var S="3.6.0",A=function(t,e){return new A.fn.init(t,e)};function M(t){var e=!!t&&"length"in t&&t.length,n=E(t);return!b(t)&&!v(t)&&("array"===n||0===e||"number"===typeof e&&e>0&&e-1 in t)}A.fn=A.prototype={jquery:S,constructor:A,length:0,toArray:function(){return l.call(this)},get:function(t){return null==t?l.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=A.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return A.each(this,t)},map:function(t){return this.pushStack(A.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(A.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(A.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n+~]|"+R+")"+R+"*"),U=new RegExp(R+"|>"),q=new RegExp(I),W=new RegExp("^"+$+"$"),X={ID:new RegExp("^#("+$+")"),CLASS:new RegExp("^\\.("+$+")"),TAG:new RegExp("^("+$+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+I),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+B+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},it=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,st=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},rt=function(){d()},ot=Ct((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{j.apply(T=L.call(w.childNodes),w.childNodes),T[w.childNodes.length].nodeType}catch(kt){j={apply:T.length?function(t,e){N.apply(t,L.call(e))}:function(t,e){var n=t.length,i=0;while(t[n++]=e[i++]);t.length=n-1}}}function at(t,e,i,s){var r,a,c,h,u,g,y,b=e&&e.ownerDocument,w=e?e.nodeType:9;if(i=i||[],"string"!==typeof t||!t||1!==w&&9!==w&&11!==w)return i;if(!s&&(d(e),e=e||p,f)){if(11!==w&&(u=Q.exec(t)))if(r=u[1]){if(9===w){if(!(c=e.getElementById(r)))return i;if(c.id===r)return i.push(c),i}else if(b&&(c=b.getElementById(r))&&v(e,c)&&c.id===r)return i.push(c),i}else{if(u[2])return j.apply(i,e.getElementsByTagName(t)),i;if((r=u[3])&&n.getElementsByClassName&&e.getElementsByClassName)return j.apply(i,e.getElementsByClassName(r)),i}if(n.qsa&&!k[t+" "]&&(!m||!m.test(t))&&(1!==w||"object"!==e.nodeName.toLowerCase())){if(y=t,b=e,1===w&&(U.test(t)||H.test(t))){b=tt.test(t)&&yt(e.parentNode)||e,b===e&&n.scope||((h=e.getAttribute("id"))?h=h.replace(it,st):e.setAttribute("id",h=C)),g=o(t),a=g.length;while(a--)g[a]=(h?"#"+h:":scope")+" "+vt(g[a]);y=g.join(",")}try{return j.apply(i,b.querySelectorAll(y)),i}catch(x){k(t,!0)}finally{h===C&&e.removeAttribute("id")}}}return l(t.replace(V,"$1"),e,i,s)}function lt(){var t=[];function e(n,s){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=s}return e}function ct(t){return t[C]=!0,t}function ht(t){var e=p.createElement("fieldset");try{return!!t(e)}catch(kt){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ut(t,e){var n=t.split("|"),s=n.length;while(s--)i.attrHandle[n[s]]=e}function dt(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)while(n=n.nextSibling)if(n===e)return-1;return t?1:-1}function pt(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function gt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function ft(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ot(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function mt(t){return ct((function(e){return e=+e,ct((function(n,i){var s,r=t([],n.length,e),o=r.length;while(o--)n[s=r[o]]&&(n[s]=!(i[s]=n[s]))}))}))}function yt(t){return t&&"undefined"!==typeof t.getElementsByTagName&&t}for(e in n=at.support={},r=at.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!Y.test(e||n&&n.nodeName||"HTML")},d=at.setDocument=function(t){var e,s,o=t?t.ownerDocument||t:w;return o!=p&&9===o.nodeType&&o.documentElement?(p=o,g=p.documentElement,f=!r(p),w!=p&&(s=p.defaultView)&&s.top!==s&&(s.addEventListener?s.addEventListener("unload",rt,!1):s.attachEvent&&s.attachEvent("onunload",rt)),n.scope=ht((function(t){return g.appendChild(t).appendChild(p.createElement("div")),"undefined"!==typeof t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=ht((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=ht((function(t){return t.appendChild(p.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=K.test(p.getElementsByClassName),n.getById=ht((function(t){return g.appendChild(t).id=C,!p.getElementsByName||!p.getElementsByName(C).length})),n.getById?(i.filter["ID"]=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},i.find["ID"]=function(t,e){if("undefined"!==typeof e.getElementById&&f){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter["ID"]=function(t){var e=t.replace(et,nt);return function(t){var n="undefined"!==typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find["ID"]=function(t,e){if("undefined"!==typeof e.getElementById&&f){var n,i,s,r=e.getElementById(t);if(r){if(n=r.getAttributeNode("id"),n&&n.value===t)return[r];s=e.getElementsByName(t),i=0;while(r=s[i++])if(n=r.getAttributeNode("id"),n&&n.value===t)return[r]}return[]}}),i.find["TAG"]=n.getElementsByTagName?function(t,e){return"undefined"!==typeof e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],s=0,r=e.getElementsByTagName(t);if("*"===t){while(n=r[s++])1===n.nodeType&&i.push(n);return i}return r},i.find["CLASS"]=n.getElementsByClassName&&function(t,e){if("undefined"!==typeof e.getElementsByClassName&&f)return e.getElementsByClassName(t)},y=[],m=[],(n.qsa=K.test(p.querySelectorAll))&&(ht((function(t){var e;g.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+R+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||m.push("\\["+R+"*(?:value|"+B+")"),t.querySelectorAll("[id~="+C+"-]").length||m.push("~="),e=p.createElement("input"),e.setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||m.push("\\["+R+"*name"+R+"*="+R+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||m.push(":checked"),t.querySelectorAll("a#"+C+"+*").length||m.push(".#.+[+~]"),t.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),ht((function(t){t.innerHTML="";var e=p.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&m.push("name"+R+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),g.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=K.test(b=g.matches||g.webkitMatchesSelector||g.mozMatchesSelector||g.oMatchesSelector||g.msMatchesSelector))&&ht((function(t){n.disconnectedMatch=b.call(t,"*"),b.call(t,"[s!='']:x"),y.push("!=",I)})),m=m.length&&new RegExp(m.join("|")),y=y.length&&new RegExp(y.join("|")),e=K.test(g.compareDocumentPosition),v=e||K.test(g.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)while(e=e.parentNode)if(e===t)return!0;return!1},O=e?function(t,e){if(t===e)return u=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(i=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&i||!n.sortDetached&&e.compareDocumentPosition(t)===i?t==p||t.ownerDocument==w&&v(w,t)?-1:e==p||e.ownerDocument==w&&v(w,e)?1:h?F(h,t)-F(h,e):0:4&i?-1:1)}:function(t,e){if(t===e)return u=!0,0;var n,i=0,s=t.parentNode,r=e.parentNode,o=[t],a=[e];if(!s||!r)return t==p?-1:e==p?1:s?-1:r?1:h?F(h,t)-F(h,e):0;if(s===r)return dt(t,e);n=t;while(n=n.parentNode)o.unshift(n);n=e;while(n=n.parentNode)a.unshift(n);while(o[i]===a[i])i++;return i?dt(o[i],a[i]):o[i]==w?-1:a[i]==w?1:0},p):p},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(d(t),n.matchesSelector&&f&&!k[e+" "]&&(!y||!y.test(e))&&(!m||!m.test(e)))try{var i=b.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(kt){k(e,!0)}return at(e,p,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!=p&&d(t),v(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!=p&&d(t);var s=i.attrHandle[e.toLowerCase()],r=s&&P.call(i.attrHandle,e.toLowerCase())?s(t,e,!f):void 0;return void 0!==r?r:n.attributes||!f?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},at.escape=function(t){return(t+"").replace(it,st)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,i=[],s=0,r=0;if(u=!n.detectDuplicates,h=!n.sortStable&&t.slice(0),t.sort(O),u){while(e=t[r++])e===t[r]&&(s=i.push(r));while(s--)t.splice(i[s],1)}return h=null,t},s=at.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"===typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=s(t)}else if(3===r||4===r)return t.nodeValue}else while(e=t[i++])n+=s(e);return n},i=at.selectors={cacheLength:50,createPseudo:ct,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return X["CHILD"].test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&q.test(n)&&(e=o(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=S[t+" "];return e||(e=new RegExp("(^|"+R+")"+t+"("+R+"|$)"))&&S(t,(function(t){return e.test("string"===typeof t.className&&t.className||"undefined"!==typeof t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(i){var s=at.attr(i,t);return null==s?"!="===e:!e||(s+="","="===e?s===n:"!="===e?s!==n:"^="===e?n&&0===s.indexOf(n):"*="===e?n&&s.indexOf(n)>-1:"$="===e?n&&s.slice(-n.length)===n:"~="===e?(" "+s.replace(_," ")+" ").indexOf(n)>-1:"|="===e&&(s===n||s.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,s){var r="nth"!==t.slice(0,3),o="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===s?function(t){return!!t.parentNode}:function(e,n,l){var c,h,u,d,p,g,f=r!==o?"nextSibling":"previousSibling",m=e.parentNode,y=a&&e.nodeName.toLowerCase(),b=!l&&!a,v=!1;if(m){if(r){while(f){d=e;while(d=d[f])if(a?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;g=f="only"===t&&!g&&"nextSibling"}return!0}if(g=[o?m.firstChild:m.lastChild],o&&b){d=m,u=d[C]||(d[C]={}),h=u[d.uniqueID]||(u[d.uniqueID]={}),c=h[t]||[],p=c[0]===x&&c[1],v=p&&c[2],d=p&&m.childNodes[p];while(d=++p&&d&&d[f]||(v=p=0)||g.pop())if(1===d.nodeType&&++v&&d===e){h[t]=[x,p,v];break}}else if(b&&(d=e,u=d[C]||(d[C]={}),h=u[d.uniqueID]||(u[d.uniqueID]={}),c=h[t]||[],p=c[0]===x&&c[1],v=p),!1===v)while(d=++p&&d&&d[f]||(v=p=0)||g.pop())if((a?d.nodeName.toLowerCase()===y:1===d.nodeType)&&++v&&(b&&(u=d[C]||(d[C]={}),h=u[d.uniqueID]||(u[d.uniqueID]={}),h[t]=[x,v]),d===e))break;return v-=s,v===i||v%i===0&&v/i>=0}}},PSEUDO:function(t,e){var n,s=i.pseudos[t]||i.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return s[C]?s(e):s.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?ct((function(t,n){var i,r=s(t,e),o=r.length;while(o--)i=F(t,r[o]),t[i]=!(n[i]=r[o])})):function(t){return s(t,0,n)}):s}},pseudos:{not:ct((function(t){var e=[],n=[],i=a(t.replace(V,"$1"));return i[C]?ct((function(t,e,n,s){var r,o=i(t,null,s,[]),a=t.length;while(a--)(r=o[a])&&(t[a]=!(e[a]=r))})):function(t,s,r){return e[0]=t,i(e,null,r,n),e[0]=null,!n.pop()}})),has:ct((function(t){return function(e){return at(t,e).length>0}})),contains:ct((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||s(e)).indexOf(t)>-1}})),lang:ct((function(t){return W.test(t||"")||at.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=f?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===g},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:ft(!1),disabled:ft(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos["empty"](t)},header:function(t){return Z.test(t.nodeName)},input:function(t){return J.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:mt((function(){return[0]})),last:mt((function(t,e){return[e-1]})),eq:mt((function(t,e,n){return[n<0?n+e:n]})),even:mt((function(t,e){for(var n=0;ne?e:n;--i>=0;)t.push(i);return t})),gt:mt((function(t,e,n){for(var i=n<0?n+e:n;++i1?function(e,n,i){var s=t.length;while(s--)if(!t[s](e,n,i))return!1;return!0}:t[0]}function xt(t,e,n){for(var i=0,s=e.length;i-1&&(r[c]=!(o[c]=u))}}else y=Et(y===o?y.splice(g,y.length):y),s?s(null,o,y,l):j.apply(o,y)}))}function At(t){for(var e,n,s,r=t.length,o=i.relative[t[0].type],a=o||i.relative[" "],l=o?1:0,h=Ct((function(t){return t===e}),a,!0),u=Ct((function(t){return F(e,t)>-1}),a,!0),d=[function(t,n,i){var s=!o&&(i||n!==c)||((e=n).nodeType?h(t,n,i):u(t,n,i));return e=null,s}];l1&&wt(d),l>1&&vt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(V,"$1"),n,l0,s=t.length>0,r=function(r,o,a,l,h){var u,g,m,y=0,b="0",v=r&&[],C=[],w=c,E=r||s&&i.find["TAG"]("*",h),S=x+=null==w?1:Math.random()||.1,A=E.length;for(h&&(c=o==p||o||h);b!==A&&null!=(u=E[b]);b++){if(s&&u){g=0,o||u.ownerDocument==p||(d(u),a=!f);while(m=t[g++])if(m(u,o||p,a)){l.push(u);break}h&&(x=S)}n&&((u=!m&&u)&&y--,r&&v.push(u))}if(y+=b,n&&b!==y){g=0;while(m=e[g++])m(v,C,o,a);if(r){if(y>0)while(b--)v[b]||C[b]||(C[b]=D.call(l));C=Et(C)}j.apply(l,C),h&&!r&&C.length>0&&y+e.length>1&&at.uniqueSort(l)}return h&&(x=S,c=w),v};return n?ct(r):r}return bt.prototype=i.filters=i.pseudos,i.setFilters=new bt,o=at.tokenize=function(t,e){var n,s,r,o,a,l,c,h=A[t+" "];if(h)return e?0:h.slice(0);a=t,l=[],c=i.preFilter;while(a){for(o in n&&!(s=G.exec(a))||(s&&(a=a.slice(s[0].length)||a),l.push(r=[])),n=!1,(s=H.exec(a))&&(n=s.shift(),r.push({value:n,type:s[0].replace(V," ")}),a=a.slice(n.length)),i.filter)!(s=X[o].exec(a))||c[o]&&!(s=c[o](s))||(n=s.shift(),r.push({value:n,type:o,matches:s}),a=a.slice(n.length));if(!n)break}return e?a.length:a?at.error(t):A(t,l).slice(0)},a=at.compile=function(t,e){var n,i=[],s=[],r=M[t+" "];if(!r){e||(e=o(t)),n=e.length;while(n--)r=At(e[n]),r[C]?i.push(r):s.push(r);r=M(t,Mt(s,i)),r.selector=t}return r},l=at.select=function(t,e,n,s){var r,l,c,h,u,d="function"===typeof t&&t,p=!s&&o(t=d.selector||t);if(n=n||[],1===p.length){if(l=p[0]=p[0].slice(0),l.length>2&&"ID"===(c=l[0]).type&&9===e.nodeType&&f&&i.relative[l[1].type]){if(e=(i.find["ID"](c.matches[0].replace(et,nt),e)||[])[0],!e)return n;d&&(e=e.parentNode),t=t.slice(l.shift().value.length)}r=X["needsContext"].test(t)?0:l.length;while(r--){if(c=l[r],i.relative[h=c.type])break;if((u=i.find[h])&&(s=u(c.matches[0].replace(et,nt),tt.test(l[0].type)&&yt(e.parentNode)||e))){if(l.splice(r,1),t=s.length&&vt(l),!t)return j.apply(n,s),n;break}}}return(d||a(t,p))(s,e,!f,n,!e||tt.test(t)&&yt(e.parentNode)||e),n},n.sortStable=C.split("").sort(O).join("")===C,n.detectDuplicates=!!u,d(),n.sortDetached=ht((function(t){return 1&t.compareDocumentPosition(p.createElement("fieldset"))})),ht((function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")}))||ut("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&&ht((function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||ut("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),ht((function(t){return null==t.getAttribute("disabled")}))||ut(B,(function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null})),at}(s);A.find=k,A.expr=k.selectors,A.expr[":"]=A.expr.pseudos,A.uniqueSort=A.unique=k.uniqueSort,A.text=k.getText,A.isXMLDoc=k.isXML,A.contains=k.contains,A.escapeSelector=k.escape;var O=function(t,e,n){var i=[],s=void 0!==n;while((t=t[e])&&9!==t.nodeType)if(1===t.nodeType){if(s&&A(t).is(n))break;i.push(t)}return i},P=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},T=A.expr.match.needsContext;function D(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(t,e,n){return b(e)?A.grep(t,(function(t,i){return!!e.call(t,i,t)!==n})):e.nodeType?A.grep(t,(function(t){return t===e!==n})):"string"!==typeof e?A.grep(t,(function(t){return u.call(e,t)>-1!==n})):A.filter(e,t,n)}A.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?A.find.matchesSelector(i,t)?[i]:[]:A.find.matches(t,A.grep(e,(function(t){return 1===t.nodeType})))},A.fn.extend({find:function(t){var e,n,i=this.length,s=this;if("string"!==typeof t)return this.pushStack(A(t).filter((function(){for(e=0;e1?A.uniqueSort(n):n},filter:function(t){return this.pushStack(j(this,t||[],!1))},not:function(t){return this.pushStack(j(this,t||[],!0))},is:function(t){return!!j(this,"string"===typeof t&&T.test(t)?A(t):t||[],!1).length}});var L,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,B=A.fn.init=function(t,e,n){var i,s;if(!t)return this;if(n=n||L,"string"===typeof t){if(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:F.exec(t),!i||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof A?e[0]:e,A.merge(this,A.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:C,!0)),N.test(i[1])&&A.isPlainObject(e))for(i in e)b(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return s=C.getElementById(i[2]),s&&(this[0]=s,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):b(t)?void 0!==n.ready?n.ready(t):t(A):A.makeArray(t,this)};B.prototype=A.fn,L=A(C);var R=/^(?:parents|prev(?:Until|All))/,$={children:!0,contents:!0,next:!0,prev:!0};function z(t,e){while((t=t[e])&&1!==t.nodeType);return t}A.fn.extend({has:function(t){var e=A(t,this),n=e.length;return this.filter((function(){for(var t=0;t-1:1===n.nodeType&&A.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?A.uniqueSort(r):r)},index:function(t){return t?"string"===typeof t?u.call(A(t),this[0]):u.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(A.uniqueSort(A.merge(this.get(),A(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),A.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return O(t,"parentNode")},parentsUntil:function(t,e,n){return O(t,"parentNode",n)},next:function(t){return z(t,"nextSibling")},prev:function(t){return z(t,"previousSibling")},nextAll:function(t){return O(t,"nextSibling")},prevAll:function(t){return O(t,"previousSibling")},nextUntil:function(t,e,n){return O(t,"nextSibling",n)},prevUntil:function(t,e,n){return O(t,"previousSibling",n)},siblings:function(t){return P((t.parentNode||{}).firstChild,t)},children:function(t){return P(t.firstChild)},contents:function(t){return null!=t.contentDocument&&a(t.contentDocument)?t.contentDocument:(D(t,"template")&&(t=t.content||t),A.merge([],t.childNodes))}},(function(t,e){A.fn[t]=function(n,i){var s=A.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"===typeof i&&(s=A.filter(i,s)),this.length>1&&($[t]||A.uniqueSort(s),R.test(t)&&s.reverse()),this.pushStack(s)}}));var I=/[^\x20\t\r\n\f]+/g;function _(t){var e={};return A.each(t.match(I)||[],(function(t,n){e[n]=!0})),e}function V(t){return t}function G(t){throw t}function H(t,e,n,i){var s;try{t&&b(s=t.promise)?s.call(t).done(e).fail(n):t&&b(s=t.then)?s.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}A.Callbacks=function(t){t="string"===typeof t?_(t):A.extend({},t);var e,n,i,s,r=[],o=[],a=-1,l=function(){for(s=s||t.once,i=e=!0;o.length;a=-1){n=o.shift();while(++a-1)r.splice(n,1),n<=a&&a--})),this},has:function(t){return t?A.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return s=o=[],r=n="",this},disabled:function(){return!r},lock:function(){return s=o=[],n||e||(r=n=""),this},locked:function(){return!!s},fireWith:function(t,n){return s||(n=n||[],n=[t,n.slice?n.slice():n],o.push(n),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},A.extend({Deferred:function(t){var e=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return A.Deferred((function(n){A.each(e,(function(e,i){var s=b(t[i[4]])&&t[i[4]];r[i[1]]((function(){var t=s&&s.apply(this,arguments);t&&b(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,s?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,i){var r=0;function o(t,e,n,i){return function(){var a=this,l=arguments,c=function(){var s,c;if(!(t=r&&(n!==G&&(a=void 0,l=[i]),e.rejectWith(a,l))}};t?h():(A.Deferred.getStackHook&&(h.stackTrace=A.Deferred.getStackHook()),s.setTimeout(h))}}return A.Deferred((function(s){e[0][3].add(o(0,s,b(i)?i:V,s.notifyWith)),e[1][3].add(o(0,s,b(t)?t:V)),e[2][3].add(o(0,s,b(n)?n:G))})).promise()},promise:function(t){return null!=t?A.extend(t,i):i}},r={};return A.each(e,(function(t,s){var o=s[2],a=s[5];i[s[1]]=o.add,a&&o.add((function(){n=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),o.add(s[3].fire),r[s[0]]=function(){return r[s[0]+"With"](this===r?void 0:this,arguments),this},r[s[0]+"With"]=o.fireWith})),i.promise(r),t&&t.call(r,r),r},when:function(t){var e=arguments.length,n=e,i=Array(n),s=l.call(arguments),r=A.Deferred(),o=function(t){return function(n){i[t]=this,s[t]=arguments.length>1?l.call(arguments):n,--e||r.resolveWith(i,s)}};if(e<=1&&(H(t,r.done(o(n)).resolve,r.reject,!e),"pending"===r.state()||b(s[n]&&s[n].then)))return r.then();while(n--)H(s[n],o(n),r.reject);return r.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.Deferred.exceptionHook=function(t,e){s.console&&s.console.warn&&t&&U.test(t.name)&&s.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},A.readyException=function(t){s.setTimeout((function(){throw t}))};var q=A.Deferred();function W(){C.removeEventListener("DOMContentLoaded",W),s.removeEventListener("load",W),A.ready()}A.fn.ready=function(t){return q.then(t).catch((function(t){A.readyException(t)})),this},A.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==t&&--A.readyWait>0||q.resolveWith(C,[A]))}}),A.ready.then=q.then,"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?s.setTimeout(A.ready):(C.addEventListener("DOMContentLoaded",W),s.addEventListener("load",W));var X=function(t,e,n,i,s,r,o){var a=0,l=t.length,c=null==n;if("object"===E(n))for(a in s=!0,n)X(t,e,a,n[a],!0,r,o);else if(void 0!==i&&(s=!0,b(i)||(o=!0),c&&(o?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call(A(t),n)})),e))for(;a1,null,!0)},removeData:function(t){return this.each((function(){nt.remove(this,t)}))}}),A.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=et.get(t,e),n&&(!i||Array.isArray(n)?i=et.access(t,e,A.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=A.queue(t,e),i=n.length,s=n.shift(),r=A._queueHooks(t,e),o=function(){A.dequeue(t,e)};"inprogress"===s&&(s=n.shift(),i--),s&&("fx"===e&&n.unshift("inprogress"),delete r.stop,s.call(t,o,r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return et.get(t,n)||et.access(t,n,{empty:A.Callbacks("once memory").add((function(){et.remove(t,[e+"queue",n])}))})}}),A.fn.extend({queue:function(t,e){var n=2;return"string"!==typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]*)/i,Ct=/^$|^module$|\/(?:java|ecma)script/i;(function(){var t=C.createDocumentFragment(),e=t.appendChild(C.createElement("div")),n=C.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),y.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",y.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,e.innerHTML="",y.option=!!e.lastChild})();var wt={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function xt(t,e){var n;return n="undefined"!==typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!==typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&D(t,e)?A.merge([t],n):n}function Et(t,e){for(var n=0,i=t.length;n",""]);var St=/<|&#?\w+;/;function At(t,e,n,i,s){for(var r,o,a,l,c,h,u=e.createDocumentFragment(),d=[],p=0,g=t.length;p-1)s&&s.push(r);else if(c=ut(r),o=xt(u.appendChild(r),"script"),c&&Et(o),n){h=0;while(r=o[h++])Ct.test(r.type||"")&&n.push(r)}return u}var Mt=/^([^.]*)(?:\.(.+)|)/;function kt(){return!0}function Ot(){return!1}function Pt(t,e){return t===Tt()===("focus"===e)}function Tt(){try{return C.activeElement}catch(t){}}function Dt(t,e,n,i,s,r){var o,a;if("object"===typeof e){for(a in"string"!==typeof n&&(i=i||n,n=void 0),e)Dt(t,a,n,i,e[a],r);return t}if(null==i&&null==s?(s=n,i=n=void 0):null==s&&("string"===typeof n?(s=i,i=void 0):(s=i,i=n,n=void 0)),!1===s)s=Ot;else if(!s)return t;return 1===r&&(o=s,s=function(t){return A().off(t),o.apply(this,arguments)},s.guid=o.guid||(o.guid=A.guid++)),t.each((function(){A.event.add(this,e,s,i,n)}))}function Nt(t,e,n){n?(et.set(t,e,!1),A.event.add(t,e,{namespace:!1,handler:function(t){var i,s,r=et.get(this,e);if(1&t.isTrigger&&this[e]){if(r.length)(A.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=l.call(arguments),et.set(this,e,r),i=n(this,e),this[e](),s=et.get(this,e),r!==s||i?et.set(this,e,!1):s={},r!==s)return t.stopImmediatePropagation(),t.preventDefault(),s&&s.value}else r.length&&(et.set(this,e,{value:A.event.trigger(A.extend(r[0],A.Event.prototype),r.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===et.get(t,e)&&A.event.add(t,e,kt)}A.event={global:{},add:function(t,e,n,i,s){var r,o,a,l,c,h,u,d,p,g,f,m=et.get(t);if(Q(t)){n.handler&&(r=n,n=r.handler,s=r.selector),s&&A.find.matchesSelector(ht,s),n.guid||(n.guid=A.guid++),(l=m.events)||(l=m.events=Object.create(null)),(o=m.handle)||(o=m.handle=function(e){return"undefined"!==typeof A&&A.event.triggered!==e.type?A.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(I)||[""],c=e.length;while(c--)a=Mt.exec(e[c])||[],p=f=a[1],g=(a[2]||"").split(".").sort(),p&&(u=A.event.special[p]||{},p=(s?u.delegateType:u.bindType)||p,u=A.event.special[p]||{},h=A.extend({type:p,origType:f,data:i,handler:n,guid:n.guid,selector:s,needsContext:s&&A.expr.match.needsContext.test(s),namespace:g.join(".")},r),(d=l[p])||(d=l[p]=[],d.delegateCount=0,u.setup&&!1!==u.setup.call(t,i,g,o)||t.addEventListener&&t.addEventListener(p,o)),u.add&&(u.add.call(t,h),h.handler.guid||(h.handler.guid=n.guid)),s?d.splice(d.delegateCount++,0,h):d.push(h),A.event.global[p]=!0)}},remove:function(t,e,n,i,s){var r,o,a,l,c,h,u,d,p,g,f,m=et.hasData(t)&&et.get(t);if(m&&(l=m.events)){e=(e||"").match(I)||[""],c=e.length;while(c--)if(a=Mt.exec(e[c])||[],p=f=a[1],g=(a[2]||"").split(".").sort(),p){u=A.event.special[p]||{},p=(i?u.delegateType:u.bindType)||p,d=l[p]||[],a=a[2]&&new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=r=d.length;while(r--)h=d[r],!s&&f!==h.origType||n&&n.guid!==h.guid||a&&!a.test(h.namespace)||i&&i!==h.selector&&("**"!==i||!h.selector)||(d.splice(r,1),h.selector&&d.delegateCount--,u.remove&&u.remove.call(t,h));o&&!d.length&&(u.teardown&&!1!==u.teardown.call(t,g,m.handle)||A.removeEvent(t,p,m.handle),delete l[p])}else for(p in l)A.event.remove(t,p+e[c],n,i,!0);A.isEmptyObject(l)&&et.remove(t,"handle events")}},dispatch:function(t){var e,n,i,s,r,o,a=new Array(arguments.length),l=A.event.fix(t),c=(et.get(this,"events")||Object.create(null))[l.type]||[],h=A.event.special[l.type]||{};for(a[0]=l,e=1;e=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(r=[],o={},n=0;n-1:A.find(s,this,null,[c]).length),o[s]&&r.push(i);r.length&&a.push({elem:c,handlers:r})}return c=this,l\s*$/g;function Bt(t,e){return D(t,"table")&&D(11!==e.nodeType?e:e.firstChild,"tr")&&A(t).children("tbody")[0]||t}function Rt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function $t(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function zt(t,e){var n,i,s,r,o,a,l;if(1===e.nodeType){if(et.hasData(t)&&(r=et.get(t),l=r.events,l))for(s in et.remove(e,"handle events"),l)for(n=0,i=l[s].length;n1&&"string"===typeof g&&!y.checkClone&&Lt.test(g))return t.each((function(s){var r=t.eq(s);f&&(e[0]=g.call(this,s,r.html())),_t(r,e,n,i)}));if(d&&(s=At(e,t[0].ownerDocument,!1,t,i),r=s.firstChild,1===s.childNodes.length&&(s=r),r||i)){for(o=A.map(xt(s,"script"),Rt),a=o.length;u0&&Et(o,!l&&xt(t,"script")),a},cleanData:function(t){for(var e,n,i,s=A.event.special,r=0;void 0!==(n=t[r]);r++)if(Q(n)){if(e=n[et.expando]){if(e.events)for(i in e.events)s[i]?A.event.remove(n,i):A.removeEvent(n,i,e.handle);n[et.expando]=void 0}n[nt.expando]&&(n[nt.expando]=void 0)}}}),A.fn.extend({detach:function(t){return Vt(this,t,!0)},remove:function(t){return Vt(this,t)},text:function(t){return X(this,(function(t){return void 0===t?A.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return _t(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Bt(this,t);e.appendChild(t)}}))},prepend:function(){return _t(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Bt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return _t(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return _t(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(A.cleanData(xt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return A.clone(this,t,e)}))},html:function(t){return X(this,(function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"===typeof t&&!jt.test(t)&&!wt[(vt.exec(t)||["",""])[1].toLowerCase()]){t=A.htmlPrefilter(t);try{for(;n=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-r-l-a-.5))||0),l}function oe(t,e,n){var i=Ht(t),s=!y.boxSizingReliable()||n,r=s&&"border-box"===A.css(t,"boxSizing",!1,i),o=r,a=Wt(t,e,i),l="offset"+e[0].toUpperCase()+e.slice(1);if(Gt.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&r||!y.reliableTrDimensions()&&D(t,"tr")||"auto"===a||!parseFloat(a)&&"inline"===A.css(t,"display",!1,i))&&t.getClientRects().length&&(r="border-box"===A.css(t,"boxSizing",!1,i),o=l in t,o&&(a=t[l])),a=parseFloat(a)||0,a+re(t,e,n||(r?"border":"content"),o,i,a)+"px"}function ae(t,e,n,i,s){return new ae.prototype.init(t,e,n,i,s)}A.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Wt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var s,r,o,a=K(e),l=ee.test(e),c=t.style;if(l||(e=Qt(a)),o=A.cssHooks[e]||A.cssHooks[a],void 0===n)return o&&"get"in o&&void 0!==(s=o.get(t,!1,i))?s:c[e];r=typeof n,"string"===r&&(s=lt.exec(n))&&s[1]&&(n=gt(t,e,s),r="number"),null!=n&&n===n&&("number"!==r||l||(n+=s&&s[3]||(A.cssNumber[a]?"":"px")),y.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),o&&"set"in o&&void 0===(n=o.set(t,n,i))||(l?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,i){var s,r,o,a=K(e),l=ee.test(e);return l||(e=Qt(a)),o=A.cssHooks[e]||A.cssHooks[a],o&&"get"in o&&(s=o.get(t,!0,n)),void 0===s&&(s=Wt(t,e,i)),"normal"===s&&e in ie&&(s=ie[e]),""===n||n?(r=parseFloat(s),!0===n||isFinite(r)?r||0:s):s}}),A.each(["height","width"],(function(t,e){A.cssHooks[e]={get:function(t,n,i){if(n)return!te.test(A.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?oe(t,e,i):Ut(t,ne,(function(){return oe(t,e,i)}))},set:function(t,n,i){var s,r=Ht(t),o=!y.scrollboxSize()&&"absolute"===r.position,a=o||i,l=a&&"border-box"===A.css(t,"boxSizing",!1,r),c=i?re(t,e,i,l,r):0;return l&&o&&(c-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(r[e])-re(t,e,"border",!1,r)-.5)),c&&(s=lt.exec(n))&&"px"!==(s[3]||"px")&&(t.style[e]=n,n=A.css(t,e)),se(t,n,c)}}})),A.cssHooks.marginLeft=Xt(y.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-Ut(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(t,e){A.cssHooks[t+e]={expand:function(n){for(var i=0,s={},r="string"===typeof n?n.split(" "):[n];i<4;i++)s[t+ct[i]+e]=r[i]||r[i-2]||r[0];return s}},"margin"!==t&&(A.cssHooks[t+e].set=se)})),A.fn.extend({css:function(t,e){return X(this,(function(t,e,n){var i,s,r={},o=0;if(Array.isArray(e)){for(i=Ht(t),s=e.length;o1)}}),A.Tween=ae,ae.prototype={constructor:ae,init:function(t,e,n,i,s,r){this.elem=t,this.prop=n,this.easing=s||A.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(A.cssNumber[n]?"":"px")},cur:function(){var t=ae.propHooks[this.prop];return t&&t.get?t.get(this):ae.propHooks._default.get(this)},run:function(t){var e,n=ae.propHooks[this.prop];return this.options.duration?this.pos=e=A.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ae.propHooks._default.set(this),this}},ae.prototype.init.prototype=ae.prototype,ae.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=A.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){A.fx.step[t.prop]?A.fx.step[t.prop](t):1!==t.elem.nodeType||!A.cssHooks[t.prop]&&null==t.elem.style[Qt(t.prop)]?t.elem[t.prop]=t.now:A.style(t.elem,t.prop,t.now+t.unit)}}},ae.propHooks.scrollTop=ae.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},A.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},A.fx=ae.prototype.init,A.fx.step={};var le,ce,he=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function de(){ce&&(!1===C.hidden&&s.requestAnimationFrame?s.requestAnimationFrame(de):s.setTimeout(de,A.fx.interval),A.fx.tick())}function pe(){return s.setTimeout((function(){le=void 0})),le=Date.now()}function ge(t,e){var n,i=0,s={height:t};for(e=e?1:0;i<4;i+=2-e)n=ct[i],s["margin"+n]=s["padding"+n]=t;return e&&(s.opacity=s.width=t),s}function fe(t,e,n){for(var i,s=(be.tweeners[e]||[]).concat(be.tweeners["*"]),r=0,o=s.length;r1)},removeAttr:function(t){return this.each((function(){A.removeAttr(this,t)}))}}),A.extend({attr:function(t,e,n){var i,s,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return"undefined"===typeof t.getAttribute?A.prop(t,e,n):(1===r&&A.isXMLDoc(t)||(s=A.attrHooks[e.toLowerCase()]||(A.expr.match.bool.test(e)?ve:void 0)),void 0!==n?null===n?void A.removeAttr(t,e):s&&"set"in s&&void 0!==(i=s.set(t,n,e))?i:(t.setAttribute(e,n+""),n):s&&"get"in s&&null!==(i=s.get(t,e))?i:(i=A.find.attr(t,e),null==i?void 0:i))},attrHooks:{type:{set:function(t,e){if(!y.radioValue&&"radio"===e&&D(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,s=e&&e.match(I);if(s&&1===t.nodeType)while(n=s[i++])t.removeAttribute(n)}}),ve={set:function(t,e,n){return!1===e?A.removeAttr(t,n):t.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=Ce[e]||A.find.attr;Ce[e]=function(t,e,i){var s,r,o=e.toLowerCase();return i||(r=Ce[o],Ce[o]=s,s=null!=n(t,e,i)?o:null,Ce[o]=r),s}}));var we=/^(?:input|select|textarea|button)$/i,xe=/^(?:a|area)$/i;function Ee(t){var e=t.match(I)||[];return e.join(" ")}function Se(t){return t.getAttribute&&t.getAttribute("class")||""}function Ae(t){return Array.isArray(t)?t:"string"===typeof t&&t.match(I)||[]}A.fn.extend({prop:function(t,e){return X(this,A.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[A.propFix[t]||t]}))}}),A.extend({prop:function(t,e,n){var i,s,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&A.isXMLDoc(t)||(e=A.propFix[e]||e,s=A.propHooks[e]),void 0!==n?s&&"set"in s&&void 0!==(i=s.set(t,n,e))?i:t[e]=n:s&&"get"in s&&null!==(i=s.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=A.find.attr(t,"tabindex");return e?parseInt(e,10):we.test(t.nodeName)||xe.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(A.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(t){var e,n,i,s,r,o,a,l=0;if(b(t))return this.each((function(e){A(this).addClass(t.call(this,e,Se(this)))}));if(e=Ae(t),e.length)while(n=this[l++])if(s=Se(n),i=1===n.nodeType&&" "+Ee(s)+" ",i){o=0;while(r=e[o++])i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=Ee(i),s!==a&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,s,r,o,a,l=0;if(b(t))return this.each((function(e){A(this).removeClass(t.call(this,e,Se(this)))}));if(!arguments.length)return this.attr("class","");if(e=Ae(t),e.length)while(n=this[l++])if(s=Se(n),i=1===n.nodeType&&" "+Ee(s)+" ",i){o=0;while(r=e[o++])while(i.indexOf(" "+r+" ")>-1)i=i.replace(" "+r+" "," ");a=Ee(i),s!==a&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t,i="string"===n||Array.isArray(t);return"boolean"===typeof e&&i?e?this.addClass(t):this.removeClass(t):b(t)?this.each((function(n){A(this).toggleClass(t.call(this,n,Se(this),e),e)})):this.each((function(){var e,s,r,o;if(i){s=0,r=A(this),o=Ae(t);while(e=o[s++])r.hasClass(e)?r.removeClass(e):r.addClass(e)}else void 0!==t&&"boolean"!==n||(e=Se(this),e&&et.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":et.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,i=0;e=" "+t+" ";while(n=this[i++])if(1===n.nodeType&&(" "+Ee(Se(n))+" ").indexOf(e)>-1)return!0;return!1}});var Me=/\r/g;A.fn.extend({val:function(t){var e,n,i,s=this[0];return arguments.length?(i=b(t),this.each((function(n){var s;1===this.nodeType&&(s=i?t.call(this,n,A(this).val()):t,null==s?s="":"number"===typeof s?s+="":Array.isArray(s)&&(s=A.map(s,(function(t){return null==t?"":t+""}))),e=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,s,"value")||(this.value=s))}))):s?(e=A.valHooks[s.type]||A.valHooks[s.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(n=e.get(s,"value"))?n:(n=s.value,"string"===typeof n?n.replace(Me,""):null==n?"":n)):void 0}}),A.extend({valHooks:{option:{get:function(t){var e=A.find.attr(t,"value");return null!=e?e:Ee(A.text(t))}},select:{get:function(t){var e,n,i,s=t.options,r=t.selectedIndex,o="select-one"===t.type,a=o?null:[],l=o?r+1:s.length;for(i=r<0?l:o?r:0;i-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=A.inArray(A(t).val(),e)>-1}},y.checkOn||(A.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),y.focusin="onfocusin"in s;var ke=/^(?:focusinfocus|focusoutblur)$/,Oe=function(t){t.stopPropagation()};A.extend(A.event,{trigger:function(t,e,n,i){var r,o,a,l,c,h,u,d,p=[n||C],f=g.call(t,"type")?t.type:t,m=g.call(t,"namespace")?t.namespace.split("."):[];if(o=d=a=n=n||C,3!==n.nodeType&&8!==n.nodeType&&!ke.test(f+A.event.triggered)&&(f.indexOf(".")>-1&&(m=f.split("."),f=m.shift(),m.sort()),c=f.indexOf(":")<0&&"on"+f,t=t[A.expando]?t:new A.Event(f,"object"===typeof t&&t),t.isTrigger=i?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:A.makeArray(e,[t]),u=A.event.special[f]||{},i||!u.trigger||!1!==u.trigger.apply(n,e))){if(!i&&!u.noBubble&&!v(n)){for(l=u.delegateType||f,ke.test(l+f)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||C)&&p.push(a.defaultView||a.parentWindow||s)}r=0;while((o=p[r++])&&!t.isPropagationStopped())d=o,t.type=r>1?l:u.bindType||f,h=(et.get(o,"events")||Object.create(null))[t.type]&&et.get(o,"handle"),h&&h.apply(o,e),h=c&&o[c],h&&h.apply&&Q(o)&&(t.result=h.apply(o,e),!1===t.result&&t.preventDefault());return t.type=f,i||t.isDefaultPrevented()||u._default&&!1!==u._default.apply(p.pop(),e)||!Q(n)||c&&b(n[f])&&!v(n)&&(a=n[c],a&&(n[c]=null),A.event.triggered=f,t.isPropagationStopped()&&d.addEventListener(f,Oe),n[f](),t.isPropagationStopped()&&d.removeEventListener(f,Oe),A.event.triggered=void 0,a&&(n[c]=a)),t.result}},simulate:function(t,e,n){var i=A.extend(new A.Event,n,{type:t,isSimulated:!0});A.event.trigger(i,null,e)}}),A.fn.extend({trigger:function(t,e){return this.each((function(){A.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return A.event.trigger(t,e,n,!0)}}),y.focusin||A.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){A.event.simulate(e,t.target,A.event.fix(t))};A.event.special[e]={setup:function(){var i=this.ownerDocument||this.document||this,s=et.access(i,e);s||i.addEventListener(t,n,!0),et.access(i,e,(s||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,s=et.access(i,e)-1;s?et.access(i,e,s):(i.removeEventListener(t,n,!0),et.remove(i,e))}}}));var Pe=s.location,Te={guid:Date.now()},De=/\?/;A.parseXML=function(t){var e,n;if(!t||"string"!==typeof t)return null;try{e=(new s.DOMParser).parseFromString(t,"text/xml")}catch(i){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||A.error("Invalid XML: "+(n?A.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Ne=/\[\]$/,je=/\r?\n/g,Le=/^(?:submit|button|image|reset|file)$/i,Fe=/^(?:input|select|textarea|keygen)/i;function Be(t,e,n,i){var s;if(Array.isArray(e))A.each(e,(function(e,s){n||Ne.test(t)?i(t,s):Be(t+"["+("object"===typeof s&&null!=s?e:"")+"]",s,n,i)}));else if(n||"object"!==E(e))i(t,e);else for(s in e)Be(t+"["+s+"]",e[s],n,i)}A.param=function(t,e){var n,i=[],s=function(t,e){var n=b(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!A.isPlainObject(t))A.each(t,(function(){s(this.name,this.value)}));else for(n in t)Be(n,t[n],e,s);return i.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=A.prop(this,"elements");return t?A.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!A(this).is(":disabled")&&Fe.test(this.nodeName)&&!Le.test(t)&&(this.checked||!bt.test(t))})).map((function(t,e){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(t){return{name:e.name,value:t.replace(je,"\r\n")}})):{name:e.name,value:n.replace(je,"\r\n")}})).get()}});var Re=/%20/g,$e=/#.*$/,ze=/([?&])_=[^&]*/,Ie=/^(.*?):[ \t]*([^\r\n]*)$/gm,_e=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ve=/^(?:GET|HEAD)$/,Ge=/^\/\//,He={},Ue={},qe="*/".concat("*"),We=C.createElement("a");function Xe(t){return function(e,n){"string"!==typeof e&&(n=e,e="*");var i,s=0,r=e.toLowerCase().match(I)||[];if(b(n))while(i=r[s++])"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Ye(t,e,n,i){var s={},r=t===Ue;function o(a){var l;return s[a]=!0,A.each(t[a]||[],(function(t,a){var c=a(e,n,i);return"string"!==typeof c||r||s[c]?r?!(l=c):void 0:(e.dataTypes.unshift(c),o(c),!1)})),l}return o(e.dataTypes[0])||!s["*"]&&o("*")}function Je(t,e){var n,i,s=A.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((s[n]?t:i||(i={}))[n]=e[n]);return i&&A.extend(!0,t,i),t}function Ze(t,e,n){var i,s,r,o,a=t.contents,l=t.dataTypes;while("*"===l[0])l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){l.unshift(s);break}if(l[0]in n)r=l[0];else{for(s in n){if(!l[0]||t.converters[s+" "+l[0]]){r=s;break}o||(o=s)}r=r||o}if(r)return r!==l[0]&&l.unshift(r),n[r]}function Ke(t,e,n,i){var s,r,o,a,l,c={},h=t.dataTypes.slice();if(h[1])for(o in t.converters)c[o.toLowerCase()]=t.converters[o];r=h.shift();while(r)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=h.shift(),r)if("*"===r)r=l;else if("*"!==l&&l!==r){if(o=c[l+" "+r]||c["* "+r],!o)for(s in c)if(a=s.split(" "),a[1]===r&&(o=c[l+" "+a[0]]||c["* "+a[0]],o)){!0===o?o=c[s]:!0!==c[s]&&(r=a[0],h.unshift(a[1]));break}if(!0!==o)if(o&&t.throws)e=o(e);else try{e=o(e)}catch(u){return{state:"parsererror",error:o?u:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}}We.href=Pe.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Pe.href,type:"GET",isLocal:_e.test(Pe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Je(Je(t,A.ajaxSettings),e):Je(A.ajaxSettings,t)},ajaxPrefilter:Xe(He),ajaxTransport:Xe(Ue),ajax:function(t,e){"object"===typeof t&&(e=t,t=void 0),e=e||{};var n,i,r,o,a,l,c,h,u,d,p=A.ajaxSetup({},e),g=p.context||p,f=p.context&&(g.nodeType||g.jquery)?A(g):A.event,m=A.Deferred(),y=A.Callbacks("once memory"),b=p.statusCode||{},v={},w={},x="canceled",E={readyState:0,getResponseHeader:function(t){var e;if(c){if(!o){o={};while(e=Ie.exec(r))o[e[1].toLowerCase()+" "]=(o[e[1].toLowerCase()+" "]||[]).concat(e[2])}e=o[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?r:null},setRequestHeader:function(t,e){return null==c&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,v[t]=e),this},overrideMimeType:function(t){return null==c&&(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)E.always(t[E.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||x;return n&&n.abort(e),S(0,e),this}};if(m.promise(E),p.url=((t||p.url||Pe.href)+"").replace(Ge,Pe.protocol+"//"),p.type=e.method||e.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(I)||[""],null==p.crossDomain){l=C.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=We.protocol+"//"+We.host!==l.protocol+"//"+l.host}catch(M){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!==typeof p.data&&(p.data=A.param(p.data,p.traditional)),Ye(He,p,e,E),c)return E;for(u in h=A.event&&p.global,h&&0===A.active++&&A.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ve.test(p.type),i=p.url.replace($e,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Re,"+")):(d=p.url.slice(i.length),p.data&&(p.processData||"string"===typeof p.data)&&(i+=(De.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(ze,"$1"),d=(De.test(i)?"&":"?")+"_="+Te.guid+++d),p.url=i+d),p.ifModified&&(A.lastModified[i]&&E.setRequestHeader("If-Modified-Since",A.lastModified[i]),A.etag[i]&&E.setRequestHeader("If-None-Match",A.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||e.contentType)&&E.setRequestHeader("Content-Type",p.contentType),E.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+qe+"; q=0.01":""):p.accepts["*"]),p.headers)E.setRequestHeader(u,p.headers[u]);if(p.beforeSend&&(!1===p.beforeSend.call(g,E,p)||c))return E.abort();if(x="abort",y.add(p.complete),E.done(p.success),E.fail(p.error),n=Ye(Ue,p,e,E),n){if(E.readyState=1,h&&f.trigger("ajaxSend",[E,p]),c)return E;p.async&&p.timeout>0&&(a=s.setTimeout((function(){E.abort("timeout")}),p.timeout));try{c=!1,n.send(v,S)}catch(M){if(c)throw M;S(-1,M)}}else S(-1,"No Transport");function S(t,e,o,l){var u,d,v,C,w,x=e;c||(c=!0,a&&s.clearTimeout(a),n=void 0,r=l||"",E.readyState=t>0?4:0,u=t>=200&&t<300||304===t,o&&(C=Ze(p,E,o)),!u&&A.inArray("script",p.dataTypes)>-1&&A.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),C=Ke(p,C,E,u),u?(p.ifModified&&(w=E.getResponseHeader("Last-Modified"),w&&(A.lastModified[i]=w),w=E.getResponseHeader("etag"),w&&(A.etag[i]=w)),204===t||"HEAD"===p.type?x="nocontent":304===t?x="notmodified":(x=C.state,d=C.data,v=C.error,u=!v)):(v=x,!t&&x||(x="error",t<0&&(t=0))),E.status=t,E.statusText=(e||x)+"",u?m.resolveWith(g,[d,x,E]):m.rejectWith(g,[E,x,v]),E.statusCode(b),b=void 0,h&&f.trigger(u?"ajaxSuccess":"ajaxError",[E,p,u?d:v]),y.fireWith(g,[E,x]),h&&(f.trigger("ajaxComplete",[E,p]),--A.active||A.event.trigger("ajaxStop")))}return E},getJSON:function(t,e,n){return A.get(t,e,n,"json")},getScript:function(t,e){return A.get(t,void 0,e,"script")}}),A.each(["get","post"],(function(t,e){A[e]=function(t,n,i,s){return b(n)&&(s=s||i,i=n,n=void 0),A.ajax(A.extend({url:t,type:e,dataType:s,data:n,success:i},A.isPlainObject(t)&&t))}})),A.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),A._evalUrl=function(t,e,n){return A.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){A.globalEval(t,e,n)}})},A.fn.extend({wrapAll:function(t){var e;return this[0]&&(b(t)&&(t=t.call(this[0])),e=A(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){var t=this;while(t.firstElementChild)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return b(t)?this.each((function(e){A(this).wrapInner(t.call(this,e))})):this.each((function(){var e=A(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=b(t);return this.each((function(n){A(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(t){return!A.expr.pseudos.visible(t)},A.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new s.XMLHttpRequest}catch(t){}};var Qe={0:200,1223:204},tn=A.ajaxSettings.xhr();y.cors=!!tn&&"withCredentials"in tn,y.ajax=tn=!!tn,A.ajaxTransport((function(t){var e,n;if(y.cors||tn&&!t.crossDomain)return{send:function(i,r){var o,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];for(o in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(o,i[o]);e=function(t){return function(){e&&(e=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!==typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Qe[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!==typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),n=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&s.setTimeout((function(){e&&n()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(l){if(e)throw l}},abort:function(){e&&e()}}})),A.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),A.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return A.globalEval(t),t}}}),A.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),A.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,s){e=A(" + + \ No newline at end of file diff --git a/src/components/shared/tui-editor-vue/index.ts b/src/components/shared/tui-editor-vue/index.ts new file mode 100644 index 0000000..3dfe6d5 --- /dev/null +++ b/src/components/shared/tui-editor-vue/index.ts @@ -0,0 +1,25 @@ +// from: https://github.com/nhn/tui.editor/blob/66db3f8d4099141332fab88e88a8afd191808648/apps/vue-editor/src/index.js +import Editor from './TUIEditor.vue'; +// import Viewer from './TUIViewer.vue'; + +export { Editor }; + +// From mixin +export const editorEvents = [ + 'load', + 'change', + 'caretChange', + 'focus', + 'blur', + 'keydown', + 'keyup', + 'beforePreviewRender', + 'beforeConvertWysiwygToMarkdown', +] as const; + +export const defaultValueMap = { + initialEditType: 'markdown', + initialValue: '', + height: '320px', + previewStyle: 'vertical', +}; \ No newline at end of file From e0e856e7e216f27257da62e15a40db86c44bd7b7 Mon Sep 17 00:00:00 2001 From: eensander Date: Thu, 30 Jun 2022 02:46:57 +0200 Subject: [PATCH 4/7] needed for tui editor --- src/style/index.scss | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/style/index.scss b/src/style/index.scss index 6199896..2d664b3 100644 --- a/src/style/index.scss +++ b/src/style/index.scss @@ -1,4 +1,11 @@ -@tailwind base; +// There are problems with the specificity of the toastui-toolbar buttons and +// tailwindcss's preflight button specification. The following is the only +// current 'solution' to this. + +/* @tailwind base; */ +@import "~tailwindcss/lib/css/preflight.css"; +@import "~@toast-ui/editor/dist/toastui-editor.css"; + @tailwind components; @tailwind utilities; From 618c30d9eecf5e79282343aae0667b4004368ab7 Mon Sep 17 00:00:00 2001 From: eensander Date: Thu, 30 Jun 2022 03:56:18 +0200 Subject: [PATCH 5/7] markdown editor aswell as escaping works basic --- package-lock.json | 135 ++++++++ package.json | 1 + .../graph/GraphModelerConfigBar.vue | 91 ++++- src/components/shared/ModalComponent.vue | 67 ++++ src/components/shared/easymde/EasymdeView.vue | 54 +++ src/components/shared/easymde/index.ts | 3 + .../shared/tui-editor-vue/TUIEditor.vue | 96 ------ src/components/shared/tui-editor-vue/index.ts | 25 -- src/style/index.scss | 19 +- src/utils/graph.ts | 4 - src/utils/modal.ts | 17 + src/utils/transformer/docassemble.ts | 20 +- src/utils/transformer/docassemble_legacy.ts | 318 ------------------ tailwind.config.js | 2 +- 14 files changed, 382 insertions(+), 470 deletions(-) create mode 100644 src/components/shared/ModalComponent.vue create mode 100644 src/components/shared/easymde/EasymdeView.vue create mode 100644 src/components/shared/easymde/index.ts delete mode 100644 src/components/shared/tui-editor-vue/TUIEditor.vue delete mode 100644 src/components/shared/tui-editor-vue/index.ts create mode 100644 src/utils/modal.ts delete mode 100644 src/utils/transformer/docassemble_legacy.ts diff --git a/package-lock.json b/package-lock.json index 20385c9..030948e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "@vue/eslint-config-typescript": "^9.1.0", "autoprefixer": "^10.4.4", "axios": "^0.26.1", + "easymde": "^2.16.1", "eslint": "^7.32.0", "eslint-plugin-vue": "^8.0.3", "postcss": "^8.4.12", @@ -2099,6 +2100,15 @@ "@types/node": "*" } }, + "node_modules/@types/codemirror": { + "version": "5.60.5", + "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.5.tgz", + "integrity": "sha512-TiECZmm8St5YxjFUp64LK0c8WU5bxMDt9YaAek1UqUb9swrSCoJhh92fWu1p3mTEqlHjhB5sY7OFBhWroJXZVg==", + "dev": true, + "dependencies": { + "@types/tern": "*" + } + }, "node_modules/@types/connect": { "version": "3.4.35", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", @@ -2188,6 +2198,12 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "node_modules/@types/marked": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/marked/-/marked-4.0.3.tgz", + "integrity": "sha512-HnMWQkLJEf/PnxZIfbm0yGJRRZYYMhb++O9M36UCTA9z53uPvVoSlAwJr3XOpDEryb7Hwl1qAx/MV6YIW1RXxg==", + "dev": true + }, "node_modules/@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", @@ -2264,6 +2280,15 @@ "@types/node": "*" } }, + "node_modules/@types/tern": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.4.tgz", + "integrity": "sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg==", + "dev": true, + "dependencies": { + "@types/estree": "*" + } + }, "node_modules/@types/uuid": { "version": "8.3.4", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", @@ -4386,6 +4411,21 @@ "node": ">=6" } }, + "node_modules/codemirror": { + "version": "5.65.6", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.6.tgz", + "integrity": "sha512-zNihMSMoDxK9Gqv9oEyDT8oM51rcRrQ+IEo2zyS48gJByBq5Fj8XuNEguMra+MuIOuh6lkpnLUJeL70DoTt6yw==", + "dev": true + }, + "node_modules/codemirror-spell-checker": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz", + "integrity": "sha512-2Tl6n0v+GJRsC9K3MLCdLaMOmvWL0uukajNJseorZJsslaxZyZMgENocPU8R0DyoTAiKsyqiemSOZo7kjGV0LQ==", + "dev": true, + "dependencies": { + "typo-js": "*" + } + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -5308,6 +5348,19 @@ "node": ">=6.0.0" } }, + "node_modules/easymde": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/easymde/-/easymde-2.16.1.tgz", + "integrity": "sha512-FihYgjRsKfhGNk89SHSqxKLC4aJ1kfybPWW6iAmtb5GnXu+tnFPSzSaGBmk1RRlCuhFSjhF0SnIMGVPjEzkr6g==", + "dev": true, + "dependencies": { + "@types/codemirror": "^5.60.4", + "@types/marked": "^4.0.1", + "codemirror": "^5.63.1", + "codemirror-spell-checker": "1.1.2", + "marked": "^4.0.10" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -7807,6 +7860,18 @@ "semver": "bin/semver.js" } }, + "node_modules/marked": { + "version": "4.0.17", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.17.tgz", + "integrity": "sha512-Wfk0ATOK5iPxM4ptrORkFemqroz0ZDxp5MWfYA7H/F+wO17NRWV5Ypxi6p3g2Xmw2bKeiYOl6oVnLHKxBA0VhA==", + "dev": true, + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/mdn-data": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", @@ -11037,6 +11102,12 @@ "node": ">=4.2.0" } }, + "node_modules/typo-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/typo-js/-/typo-js-1.2.1.tgz", + "integrity": "sha512-bTGLjbD3WqZDR3CgEFkyi9Q/SS2oM29ipXrWfDb4M74ea69QwKAECVceYpaBu0GfdnASMg9Qfl67ttB23nePHg==", + "dev": true + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -13628,6 +13699,15 @@ "@types/node": "*" } }, + "@types/codemirror": { + "version": "5.60.5", + "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-5.60.5.tgz", + "integrity": "sha512-TiECZmm8St5YxjFUp64LK0c8WU5bxMDt9YaAek1UqUb9swrSCoJhh92fWu1p3mTEqlHjhB5sY7OFBhWroJXZVg==", + "dev": true, + "requires": { + "@types/tern": "*" + } + }, "@types/connect": { "version": "3.4.35", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", @@ -13717,6 +13797,12 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "@types/marked": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/marked/-/marked-4.0.3.tgz", + "integrity": "sha512-HnMWQkLJEf/PnxZIfbm0yGJRRZYYMhb++O9M36UCTA9z53uPvVoSlAwJr3XOpDEryb7Hwl1qAx/MV6YIW1RXxg==", + "dev": true + }, "@types/mime": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", @@ -13793,6 +13879,15 @@ "@types/node": "*" } }, + "@types/tern": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.4.tgz", + "integrity": "sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg==", + "dev": true, + "requires": { + "@types/estree": "*" + } + }, "@types/uuid": { "version": "8.3.4", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", @@ -15388,6 +15483,21 @@ "shallow-clone": "^3.0.0" } }, + "codemirror": { + "version": "5.65.6", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.6.tgz", + "integrity": "sha512-zNihMSMoDxK9Gqv9oEyDT8oM51rcRrQ+IEo2zyS48gJByBq5Fj8XuNEguMra+MuIOuh6lkpnLUJeL70DoTt6yw==", + "dev": true + }, + "codemirror-spell-checker": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz", + "integrity": "sha512-2Tl6n0v+GJRsC9K3MLCdLaMOmvWL0uukajNJseorZJsslaxZyZMgENocPU8R0DyoTAiKsyqiemSOZo7kjGV0LQ==", + "dev": true, + "requires": { + "typo-js": "*" + } + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -16064,6 +16174,19 @@ "integrity": "sha512-wK2sCs4feiiJeFXn3zvY0p41mdU5VUgbgs1rNsc/y5ngFUijdWd+iIN8eoyuZHKB8xN6BL4PdWmzqFmxNg6V2w==", "dev": true }, + "easymde": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/easymde/-/easymde-2.16.1.tgz", + "integrity": "sha512-FihYgjRsKfhGNk89SHSqxKLC4aJ1kfybPWW6iAmtb5GnXu+tnFPSzSaGBmk1RRlCuhFSjhF0SnIMGVPjEzkr6g==", + "dev": true, + "requires": { + "@types/codemirror": "^5.60.4", + "@types/marked": "^4.0.1", + "codemirror": "^5.63.1", + "codemirror-spell-checker": "1.1.2", + "marked": "^4.0.10" + } + }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -17943,6 +18066,12 @@ } } }, + "marked": { + "version": "4.0.17", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.17.tgz", + "integrity": "sha512-Wfk0ATOK5iPxM4ptrORkFemqroz0ZDxp5MWfYA7H/F+wO17NRWV5Ypxi6p3g2Xmw2bKeiYOl6oVnLHKxBA0VhA==", + "dev": true + }, "mdn-data": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", @@ -20274,6 +20403,12 @@ "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", "dev": true }, + "typo-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/typo-js/-/typo-js-1.2.1.tgz", + "integrity": "sha512-bTGLjbD3WqZDR3CgEFkyi9Q/SS2oM29ipXrWfDb4M74ea69QwKAECVceYpaBu0GfdnASMg9Qfl67ttB23nePHg==", + "dev": true + }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", diff --git a/package.json b/package.json index b82e61a..62ac4ea 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@vue/eslint-config-typescript": "^9.1.0", "autoprefixer": "^10.4.4", "axios": "^0.26.1", + "easymde": "^2.16.1", "eslint": "^7.32.0", "eslint-plugin-vue": "^8.0.3", "postcss": "^8.4.12", diff --git a/src/components/graph/GraphModelerConfigBar.vue b/src/components/graph/GraphModelerConfigBar.vue index e20031b..f8ce508 100644 --- a/src/components/graph/GraphModelerConfigBar.vue +++ b/src/components/graph/GraphModelerConfigBar.vue @@ -7,7 +7,30 @@
- + + + +
+
+ +
+

Are you sure you want to deactivate your account? All of your data will be permanently removed. This action cannot be undone.

+
+
+ +
+
+
+
+ + +
+
+
{{ titleCase((cell.data as AntvNodeData).gd.type) }} node @@ -17,29 +40,40 @@
- {{ field_group }} + + {{ field_group.toString()[0].toUpperCase().concat(field_group.toString().substring(1)) }}
-